Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > sci.electronics.design > #411348 > unrolled thread
| Started by | Jasen Betts <jasen@xnet.co.nz> |
|---|---|
| First post | 2016-05-11 10:56 +0000 |
| Last post | 2016-05-13 12:35 +0000 |
| Articles | 12 — 4 participants |
Back to article view | Back to sci.electronics.design
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: WHOA! Microsoft strikes again... Jasen Betts <jasen@xnet.co.nz> - 2016-05-11 10:56 +0000
Re: WHOA! Microsoft strikes again... Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2016-05-11 11:35 -0400
Re: WHOA! Microsoft strikes again... Jasen Betts <jasen@xnet.co.nz> - 2016-05-13 12:06 +0000
Re: WHOA! Microsoft strikes again... Jasen Betts <jasen@xnet.co.nz> - 2016-05-13 12:40 +0000
Re: WHOA! Microsoft strikes again... Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2016-05-13 11:00 -0400
Re: WHOA! Microsoft strikes again... Jasen Betts <jasen@xnet.co.nz> - 2016-05-13 20:56 +0000
Re: WHOA! Microsoft strikes again... Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2016-05-13 18:19 -0400
Re: WHOA! Microsoft strikes again... Jasen Betts <jasen@xnet.co.nz> - 2016-05-14 06:21 +0000
Re: WHOA! Microsoft strikes again... Lasse Langwadt Christensen <langwadt@fonz.dk> - 2016-05-11 09:54 -0700
Re: WHOA! Microsoft strikes again... M Philbrook <jamie_ka1lpa@charter.net> - 2016-05-11 14:05 -0400
Re: WHOA! Microsoft strikes again... Jasen Betts <jasen@xnet.co.nz> - 2016-05-13 12:38 +0000
Re: WHOA! Microsoft strikes again... Jasen Betts <jasen@xnet.co.nz> - 2016-05-13 12:35 +0000
| From | Jasen Betts <jasen@xnet.co.nz> |
|---|---|
| Date | 2016-05-11 10:56 +0000 |
| Subject | Re: WHOA! Microsoft strikes again... |
| Message-ID | <ngv34m$moc$1@gonzo.alcatraz> |
On 2016-04-29, Lasse Langwadt Christensen <langwadt@fonz.dk> wrote: > Den fredag den 29. april 2016 kl. 15.01.44 UTC+2 skrev Jasen Betts: >> On 2016-04-27, Tom Gardner <spamjunk@blueyonder.co.uk> wrote: >> > On 27/04/16 14:04, Phil Hobbs wrote: >> >>> Thanks Jeff, You know I miss all the command line stuff from the old DOS days. >> >>> (It gave me this illusion, that I knew what I was doing with the 'puter.) >> >> >> >> No need to miss it, it's all still there. On my remaining Windows boxes I install Cygwin, which gives me a Unix-style (bash) command line. >> > >> > You may not need to do that much longer: MS is bringing bash and much >> > more to windows >> > Bash on Windows is Microsoft's solution to the problem and it aims to >> > bring the entire Ubuntu userland, minus the Linux kernel to Windows. >> > As a result, developers have access to the complete set of Ubuntu >> > CLI tools and utilities. In layman's terms, it's akin to running >> > Linux in Windows, natively. >> > >> > https://www.linux.com/news/bash-windows-what-does-it-mean >> > and widely reported elsewhere, e.g. >> > http://techcrunch.com/2016/03/30/be-very-afraid-hell-has-frozen-over-bash-is-coming-to-windows-10/ >> > >> > It will be interesting to see how it all pans out. >> >> Windows doesn't have "argv[]"... fork() neither SFAIK this could get messy. >> > > argv[] as in command-line arguments? that is standard C on all platforms yeah, windows doesn't have that. instead every program gets a single string and has to figure out where each argument starts and ends and what it contains... different programs often do it differently. > cygwin implements fork on windows and native windows has a createProcess > that does kinda the same thing so I'm sure MS could figure it out FAICT createproccess is not the same as fork, doesn't have the same capablities... I did somge googleing, it seems they're using a linux emulation layer (like wine but pointing the opposite direction) so they can fake argv[] in a self-consistent way without too much effort, fork will be trickier. -- \_(ツ)_
[toc] | [next] | [standalone]
| From | Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> |
|---|---|
| Date | 2016-05-11 11:35 -0400 |
| Message-ID | <7qKdncDNyYHRzK7KnZ2dnUU7-XvNnZ2d@supernews.com> |
| In reply to | #411348 |
On 05/11/2016 06:56 AM, Jasen Betts wrote: > On 2016-04-29, Lasse Langwadt Christensen <langwadt@fonz.dk> wrote: >> Den fredag den 29. april 2016 kl. 15.01.44 UTC+2 skrev Jasen Betts: >>> On 2016-04-27, Tom Gardner <spamjunk@blueyonder.co.uk> wrote: >>>> On 27/04/16 14:04, Phil Hobbs wrote: >>>>>> Thanks Jeff, You know I miss all the command line stuff from the old DOS days. >>>>>> (It gave me this illusion, that I knew what I was doing with the 'puter.) >>>>> >>>>> No need to miss it, it's all still there. On my remaining Windows boxes I install Cygwin, which gives me a Unix-style (bash) command line. >>>> >>>> You may not need to do that much longer: MS is bringing bash and much >>>> more to windows >>>> Bash on Windows is Microsoft's solution to the problem and it aims to >>>> bring the entire Ubuntu userland, minus the Linux kernel to Windows. >>>> As a result, developers have access to the complete set of Ubuntu >>>> CLI tools and utilities. In layman's terms, it's akin to running >>>> Linux in Windows, natively. >>>> >>>> https://www.linux.com/news/bash-windows-what-does-it-mean >>>> and widely reported elsewhere, e.g. >>>> http://techcrunch.com/2016/03/30/be-very-afraid-hell-has-frozen-over-bash-is-coming-to-windows-10/ >>>> >>>> It will be interesting to see how it all pans out. >>> >>> Windows doesn't have "argv[]"... fork() neither SFAIK this could get messy. >>> >> >> argv[] as in command-line arguments? that is standard C on all platforms > > yeah, windows doesn't have that. instead every program gets a single > string and has to figure out where each argument starts and ends and > what it contains... different programs often do it differently. What Windows compiler are you using? I use the normal argc/argv mechanism in programs that run on both Linux (gcc) and Windows (Visual Studio), and have never had to change that part of the code for Windows. >> cygwin implements fork on windows and native windows has a createProcess >> that does kinda the same thing so I'm sure MS could figure it out > > FAICT createproccess is not the same as fork, doesn't have the same > capablities... > > > I did somge googleing, it seems they're using a linux emulation layer > (like wine but pointing the opposite direction) so they can fake argv[] > in a self-consistent way without too much effort, fork will be trickier. Cygwin has had fork() for years. Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 hobbs at electrooptical dot net http://electrooptical.net
[toc] | [prev] | [next] | [standalone]
| From | Jasen Betts <jasen@xnet.co.nz> |
|---|---|
| Date | 2016-05-13 12:06 +0000 |
| Message-ID | <nh4fvm$i35$1@gonzo.alcatraz> |
| In reply to | #411369 |
On 2016-05-11, Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> wrote: > On 05/11/2016 06:56 AM, Jasen Betts wrote: >> On 2016-04-29, Lasse Langwadt Christensen <langwadt@fonz.dk> wrote: >>> Den fredag den 29. april 2016 kl. 15.01.44 UTC+2 skrev Jasen Betts: >>>> On 2016-04-27, Tom Gardner <spamjunk@blueyonder.co.uk> wrote: >>>>> On 27/04/16 14:04, Phil Hobbs wrote: >>>>>>> Thanks Jeff, You know I miss all the command line stuff from the old DOS days. >>>>>>> (It gave me this illusion, that I knew what I was doing with the 'puter.) >>>>>> >>>>>> No need to miss it, it's all still there. On my remaining Windows boxes I install Cygwin, which gives me a Unix-style (bash) command line. >>>>> >>>>> You may not need to do that much longer: MS is bringing bash and much >>>>> more to windows >>>>> Bash on Windows is Microsoft's solution to the problem and it aims to >>>>> bring the entire Ubuntu userland, minus the Linux kernel to Windows. >>>>> As a result, developers have access to the complete set of Ubuntu >>>>> CLI tools and utilities. In layman's terms, it's akin to running >>>>> Linux in Windows, natively. >>>>> >>>>> https://www.linux.com/news/bash-windows-what-does-it-mean >>>>> and widely reported elsewhere, e.g. >>>>> http://techcrunch.com/2016/03/30/be-very-afraid-hell-has-frozen-over-bash-is-coming-to-windows-10/ >>>>> >>>>> It will be interesting to see how it all pans out. >>>> >>>> Windows doesn't have "argv[]"... fork() neither SFAIK this could get messy. >>>> >>> >>> argv[] as in command-line arguments? that is standard C on all platforms >> >> yeah, windows doesn't have that. instead every program gets a single >> string and has to figure out where each argument starts and ends and >> what it contains... different programs often do it differently. > > What Windows compiler are you using? makes no difference. > I use the normal argc/argv mechanism in programs that run on both Linux (gcc) > and Windows (Visual Studio), and have never had to change that part of the > code for Windows. You get half-arsed argv[] supprt on windows, it's good enough for more than 90% of use cases. Try writing a work-alile for or printf(1), watch, tr, grep or sed where you can expect the user to want to use arbitrary symbols (and control characters) in the arguments. >>> cygwin implements fork on windows and native windows has a createProcess >>> that does kinda the same thing so I'm sure MS could figure it out >> >> FAICT createproccess is not the same as fork, doesn't have the same >> capablities... >> >> >> I did somge googleing, it seems they're using a linux emulation layer >> (like wine but pointing the opposite direction) so they can fake argv[] >> in a self-consistent way without too much effort, fork will be trickier. > > Cygwin has had fork() for years. they do a merry dance to get an almost fully working fork. -- \_(ツ)_
[toc] | [prev] | [next] | [standalone]
| From | Jasen Betts <jasen@xnet.co.nz> |
|---|---|
| Date | 2016-05-13 12:40 +0000 |
| Message-ID | <nh4hvr$ib9$3@gonzo.alcatraz> |
| In reply to | #411756 |
On 2016-05-13, Jasen Betts <jasen@xnet.co.nz> wrote: > makes no difference. > >> I use the normal argc/argv mechanism in programs that run on both Linux (gcc) >> and Windows (Visual Studio), and have never had to change that part of the >> code for Windows. > > You get half-arsed argv[] supprt on windows, it's good enough > for more than 90% of use cases. > > Try writing a work-alile for or printf(1), watch, tr, grep or sed where > you can expect the user to want to use arbitrary symbols (and control > characters) in the arguments. actually that's possible. -- \_(ツ)_
[toc] | [prev] | [next] | [standalone]
| From | Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> |
|---|---|
| Date | 2016-05-13 11:00 -0400 |
| Message-ID | <mvednYDltdGVcajKnZ2dnUU7-UnNnZ2d@supernews.com> |
| In reply to | #411756 |
On 05/13/2016 08:06 AM, Jasen Betts wrote: > On 2016-05-11, Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> wrote: >> On 05/11/2016 06:56 AM, Jasen Betts wrote: >>> On 2016-04-29, Lasse Langwadt Christensen <langwadt@fonz.dk> wrote: >>>> Den fredag den 29. april 2016 kl. 15.01.44 UTC+2 skrev Jasen Betts: >>>>> On 2016-04-27, Tom Gardner <spamjunk@blueyonder.co.uk> wrote: >>>>>> On 27/04/16 14:04, Phil Hobbs wrote: >>>>>>>> Thanks Jeff, You know I miss all the command line stuff from the old DOS days. >>>>>>>> (It gave me this illusion, that I knew what I was doing with the 'puter.) >>>>>>> >>>>>>> No need to miss it, it's all still there. On my remaining Windows boxes I install Cygwin, which gives me a Unix-style (bash) command line. >>>>>> >>>>>> You may not need to do that much longer: MS is bringing bash and much >>>>>> more to windows >>>>>> Bash on Windows is Microsoft's solution to the problem and it aims to >>>>>> bring the entire Ubuntu userland, minus the Linux kernel to Windows. >>>>>> As a result, developers have access to the complete set of Ubuntu >>>>>> CLI tools and utilities. In layman's terms, it's akin to running >>>>>> Linux in Windows, natively. >>>>>> >>>>>> https://www.linux.com/news/bash-windows-what-does-it-mean >>>>>> and widely reported elsewhere, e.g. >>>>>> http://techcrunch.com/2016/03/30/be-very-afraid-hell-has-frozen-over-bash-is-coming-to-windows-10/ >>>>>> >>>>>> It will be interesting to see how it all pans out. >>>>> >>>>> Windows doesn't have "argv[]"... fork() neither SFAIK this could get messy. >>>>> >>>> >>>> argv[] as in command-line arguments? that is standard C on all platforms >>> >>> yeah, windows doesn't have that. instead every program gets a single >>> string and has to figure out where each argument starts and ends and >>> what it contains... different programs often do it differently. >> >> What Windows compiler are you using? > > makes no difference. > >> I use the normal argc/argv mechanism in programs that run on both Linux (gcc) >> and Windows (Visual Studio), and have never had to change that part of the >> code for Windows. > > You get half-arsed argv[] supprt on windows, it's good enough > for more than 90% of use cases. That's completely different from your first story, where you claimed that there was only a single string. That is clearly false. How about posting some argv[] cpde that works differently between systems? I know of no differences whatsoever, but if there are any, I'd like to know about them. AFAICT argv is an array of N=argc pointers to writable null-terminated strings, no more, no less, just as specified in the C standard. See http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf , p. 13 (P31 of the PDF). > > Try writing a work-alile for or printf(1), watch, tr, grep or sed where > you can expect the user to want to use arbitrary symbols (and control > characters) in the arguments. You can print anything with printf, using the "%c" format specifier. The others are application programs, not part of the OS. > >>>> cygwin implements fork on windows and native windows has a createProcess >>>> that does kinda the same thing so I'm sure MS could figure it out >>> >>> FAICT createproccess is not the same as fork, doesn't have the same >>> capablities... >>> >>> >>> I did somge googleing, it seems they're using a linux emulation layer >>> (like wine but pointing the opposite direction) so they can fake argv[] >>> in a self-consistent way without too much effort, fork will be trickier. >> >> Cygwin has had fork() for years. > > they do a merry dance to get an almost fully working fork. What exactly is wrong with it? And what sort of "merry dance" that's more than is necessary in *nix? Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 hobbs at electrooptical dot net http://electrooptical.net
[toc] | [prev] | [next] | [standalone]
| From | Jasen Betts <jasen@xnet.co.nz> |
|---|---|
| Date | 2016-05-13 20:56 +0000 |
| Message-ID | <nh5f13$na1$1@gonzo.alcatraz> |
| In reply to | #411763 |
On 2016-05-13, Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> wrote: >> >> makes no difference. >> >>> I use the normal argc/argv mechanism in programs that run on both Linux (gcc) >>> and Windows (Visual Studio), and have never had to change that part of the >>> code for Windows. >> >> You get half-arsed argv[] supprt on windows, it's good enough >> for more than 90% of use cases. > > That's completely different from your first story, where you claimed > that there was only a single string. That is clearly false. Here microsoft explains how argv is formed from a single string https://msdn.microsoft.com/en-us/library/17w5ykft.aspx resumably that is the the single string that createprocess receives as commandline. >> Try writing a work-alile for or printf(1), watch, tr, grep or sed where >> you can expect the user to want to use arbitrary symbols (and control >> characters) in the arguments. > > You can print anything with printf, using the "%c" format specifier. > The others are application programs, not part of the OS. they are _all_, application programs, printf(1) means /usr/bin/printf it seems to be more a limitation of the shell, than windows itself, >>>> I did somge googleing, it seems they're using a linux emulation layer >>>> (like wine but pointing the opposite direction) so they can fake argv[] >>>> in a self-consistent way without too much effort, fork will be trickier. >>> >>> Cygwin has had fork() for years. >> >> they do a merry dance to get an almost fully working fork. > > What exactly is wrong with it? And what sort of "merry dance" that's > more than is necessary in *nix? in *nix fork is a kernel call. it increments the access count, and sets the copy-on-write bit on all the memory pages, duplicates some file handles and creates a new process as a clone of the existing one. On windows you can't start a process that has a copy of anothers current environment cheaply. AIUI you either start a thread that's sharing the same environment or you start a new process in a new environment. AIUI cygwin does explicit copying to duplicate everything first. -- \_(ツ)_
[toc] | [prev] | [next] | [standalone]
| From | Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> |
|---|---|
| Date | 2016-05-13 18:19 -0400 |
| Message-ID | <57365301.1040805@electrooptical.net> |
| In reply to | #411830 |
On 05/13/2016 04:56 PM, Jasen Betts wrote: > On 2016-05-13, Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> wrote: >>> >>> makes no difference. >>> >>>> I use the normal argc/argv mechanism in programs that run on both Linux (gcc) >>>> and Windows (Visual Studio), and have never had to change that part of the >>>> code for Windows. >>> >>> You get half-arsed argv[] supprt on windows, it's good enough >>> for more than 90% of use cases. >> >> That's completely different from your first story, where you claimed >> that there was only a single string. That is clearly false. > > Here microsoft explains how argv is formed from a single string > https://msdn.microsoft.com/en-us/library/17w5ykft.aspx > resumably that is the the single string that createprocess receives as > commandline. So? Where does it say that there's only one string? The sample code loops for (count = 0; count < argc; count++) which looks pretty vanilla C to me. The rest of the article is mostly about reserved characters, which are indeed different between OSes, but that's far from a "single string". > >>> Try writing a work-alile for or printf(1), watch, tr, grep or sed where >>> you can expect the user to want to use arbitrary symbols (and control >>> characters) in the arguments. >> >> You can print anything with printf, using the "%c" format specifier. >> The others are application programs, not part of the OS. > > they are _all_, application programs, printf(1) means /usr/bin/printf We're talking about C programming, or we were until you started trying to move the goal posts. Good luck referencing argv[] from printf(1). > > it seems to be more a limitation of the shell, than windows itself, Sure. I'm not trying to bust your stones, just to get to the root of the matter. > > >>>>> I did somge googleing, it seems they're using a linux emulation layer >>>>> (like wine but pointing the opposite direction) so they can fake argv[] >>>>> in a self-consistent way without too much effort, fork will be trickier. >>>> >>>> Cygwin has had fork() for years. >>> >>> they do a merry dance to get an almost fully working fork. >> >> What exactly is wrong with it? And what sort of "merry dance" that's >> more than is necessary in *nix? > > in *nix fork is a kernel call. it increments the access count, and sets the > copy-on-write bit on all the memory pages, duplicates some file handles and > creates a new process as a clone of the existing one. > > On windows you can't start a process that has a copy of anothers current > environment cheaply. AIUI you either start a thread that's sharing the > same environment or you start a new process in a new environment. > > AIUI cygwin does explicit copying to duplicate everything first. But MS has control of the Windows kernel code, so they can implement copy-on-write semantics without too much difficulty, I'd have thought. No? Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 hobbs at electrooptical dot net http://electrooptical.net
[toc] | [prev] | [next] | [standalone]
| From | Jasen Betts <jasen@xnet.co.nz> |
|---|---|
| Date | 2016-05-14 06:21 +0000 |
| Message-ID | <nh6g57$rjt$1@gonzo.alcatraz> |
| In reply to | #411838 |
On 2016-05-13, Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> wrote: > On 05/13/2016 04:56 PM, Jasen Betts wrote: >> On 2016-05-13, Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> wrote: >>>> >>>> makes no difference. >>>> >>>>> I use the normal argc/argv mechanism in programs that run on both Linux (gcc) >>>>> and Windows (Visual Studio), and have never had to change that part of the >>>>> code for Windows. >>>> >>>> You get half-arsed argv[] supprt on windows, it's good enough >>>> for more than 90% of use cases. >>> >>> That's completely different from your first story, where you claimed >>> that there was only a single string. That is clearly false. >> >> Here microsoft explains how argv is formed from a single string >> https://msdn.microsoft.com/en-us/library/17w5ykft.aspx >> resumably that is the the single string that createprocess receives as >> commandline. > > So? Where does it say that there's only one string? you mean other than all the text on that page? https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425%28v=vs.85%29.aspx says pretty much the same thing too. contrast with http://linux.die.net/man/2/execve here argv[] is being passed to a kernel call msvc creates argv[] from the commandline. in *nix is comes pre-built as passed to execve(2). >> they are _all_, application programs, printf(1) means /usr/bin/printf > > We're talking about C programming, or we were until you started trying > to move the goal posts. Good luck referencing argv[] from printf(1). They're all C programs, I conceede that are not as difficult to implement on windows as I had originally throught. >> same environment or you start a new process in a new environment. >> >> AIUI cygwin does explicit copying to duplicate everything first. > > But MS has control of the Windows kernel code, so they can implement > copy-on-write semantics without too much difficulty, I'd have thought. No? yeah, it seems that interix provided this feature... but seems not available in windows 10... so this is something new... -- \_(ツ)_
[toc] | [prev] | [next] | [standalone]
| From | Lasse Langwadt Christensen <langwadt@fonz.dk> |
|---|---|
| Date | 2016-05-11 09:54 -0700 |
| Message-ID | <e931cb01-d9de-4b33-8766-93173b069eed@googlegroups.com> |
| In reply to | #411348 |
Den onsdag den 11. maj 2016 kl. 13.31.22 UTC+2 skrev Jasen Betts: > On 2016-04-29, Lasse Langwadt Christensen <langwadt@fonz.dk> wrote: > > Den fredag den 29. april 2016 kl. 15.01.44 UTC+2 skrev Jasen Betts: > >> On 2016-04-27, Tom Gardner <spamjunk@blueyonder.co.uk> wrote: > >> > On 27/04/16 14:04, Phil Hobbs wrote: > >> >>> Thanks Jeff, You know I miss all the command line stuff from the old DOS days. > >> >>> (It gave me this illusion, that I knew what I was doing with the 'puter.) > >> >> > >> >> No need to miss it, it's all still there. On my remaining Windows boxes I install Cygwin, which gives me a Unix-style (bash) command line. > >> > > >> > You may not need to do that much longer: MS is bringing bash and much > >> > more to windows > >> > Bash on Windows is Microsoft's solution to the problem and it aims to > >> > bring the entire Ubuntu userland, minus the Linux kernel to Windows. > >> > As a result, developers have access to the complete set of Ubuntu > >> > CLI tools and utilities. In layman's terms, it's akin to running > >> > Linux in Windows, natively. > >> > > >> > https://www.linux.com/news/bash-windows-what-does-it-mean > >> > and widely reported elsewhere, e.g. > >> > http://techcrunch.com/2016/03/30/be-very-afraid-hell-has-frozen-over-bash-is-coming-to-windows-10/ > >> > > >> > It will be interesting to see how it all pans out. > >> > >> Windows doesn't have "argv[]"... fork() neither SFAIK this could get messy. > >> > > > > argv[] as in command-line arguments? that is standard C on all platforms > > yeah, windows doesn't have that. instead every program gets a single > string and has to figure out where each argument starts and ends and > what it contains... different programs often do it differently. someone forgot to tell Microsoft that, because it is an array of strings like usual > > > cygwin implements fork on windows and native windows has a createProcess > > that does kinda the same thing so I'm sure MS could figure it out > > FAICT createproccess is not the same as fork, doesn't have the same > capablities... > > > I did somge googleing, it seems they're using a linux emulation layer > (like wine but pointing the opposite direction) so they can fake argv[] > in a self-consistent way without too much effort, fork will be trickier. > with createprocess doing something similar to fork and a third party, cygwin, implementing a full featured fork, I doubt it would that difficult for MS add if they don't already have it in Interix available for servers -Lasse
[toc] | [prev] | [next] | [standalone]
| From | M Philbrook <jamie_ka1lpa@charter.net> |
|---|---|
| Date | 2016-05-11 14:05 -0400 |
| Message-ID | <MPG.319d3e8e192336e989ee8@news.eternal-september.org> |
| In reply to | #411386 |
In article <e931cb01-d9de-4b33-8766-93173b069eed@googlegroups.com>, langwadt@fonz.dk says... > > Den onsdag den 11. maj 2016 kl. 13.31.22 UTC+2 skrev Jasen Betts: > > On 2016-04-29, Lasse Langwadt Christensen <langwadt@fonz.dk> wrote: > > > Den fredag den 29. april 2016 kl. 15.01.44 UTC+2 skrev Jasen Betts: > > >> On 2016-04-27, Tom Gardner <spamjunk@blueyonder.co.uk> wrote: > > >> > On 27/04/16 14:04, Phil Hobbs wrote: > > >> >>> Thanks Jeff, You know I miss all the command line stuff from the old DOS days. > > >> >>> (It gave me this illusion, that I knew what I was doing with the 'puter.) > > >> >> > > >> >> No need to miss it, it's all still there. On my remaining Windows boxes I install Cygwin, which gives me a Unix-style (bash) command line. > > >> > > > >> > You may not need to do that much longer: MS is bringing bash and much > > >> > more to windows > > >> > Bash on Windows is Microsoft's solution to the problem and it aims to > > >> > bring the entire Ubuntu userland, minus the Linux kernel to Windows. > > >> > As a result, developers have access to the complete set of Ubuntu > > >> > CLI tools and utilities. In layman's terms, it's akin to running > > >> > Linux in Windows, natively. > > >> > > > >> > https://www.linux.com/news/bash-windows-what-does-it-mean > > >> > and widely reported elsewhere, e.g. > > >> > http://techcrunch.com/2016/03/30/be-very-afraid-hell-has-frozen-over-bash-is-coming-to-windows-10/ > > >> > > > >> > It will be interesting to see how it all pans out. > > >> > > >> Windows doesn't have "argv[]"... fork() neither SFAIK this could get messy. > > >> > > > > > > argv[] as in command-line arguments? that is standard C on all platforms > > > > yeah, windows doesn't have that. instead every program gets a single > > string and has to figure out where each argument starts and ends and > > what it contains... different programs often do it differently. > > someone forgot to tell Microsoft that, because it is an array of strings > like usual > > > > > > cygwin implements fork on windows and native windows has a createProcess > > > that does kinda the same thing so I'm sure MS could figure it out > > > > FAICT createproccess is not the same as fork, doesn't have the same > > capablities... > > > > > > I did somge googleing, it seems they're using a linux emulation layer > > (like wine but pointing the opposite direction) so they can fake argv[] > > in a self-consistent way without too much effort, fork will be trickier. > > > I don't understand why you think MS does not have such things? GetCommandLineW returns the command line string.. Pass that to the CommandLineToArgvW to have you the argc and argv. as for "Fork", thats not such a big deal. Windows can do all sorts of things when starting processes. I am not saying linux/unix method is bad because I have plans myself to tool up a couple of boxes over here but, windows has been able to do fancy things for a long time now with processes. Most likely why there are so many back yard hacks out there to invade apps. Jamie
[toc] | [prev] | [next] | [standalone]
| From | Jasen Betts <jasen@xnet.co.nz> |
|---|---|
| Date | 2016-05-13 12:38 +0000 |
| Message-ID | <nh4hsm$ib9$2@gonzo.alcatraz> |
| In reply to | #411412 |
On 2016-05-11, M Philbrook <jamie_ka1lpa@charter.net> wrote: > In article <e931cb01-d9de-4b33-8766-93173b069eed@googlegroups.com>, > langwadt@fonz.dk says... >> >> Den onsdag den 11. maj 2016 kl. 13.31.22 UTC+2 skrev Jasen Betts: >> > On 2016-04-29, Lasse Langwadt Christensen <langwadt@fonz.dk> wrote: >> > > Den fredag den 29. april 2016 kl. 15.01.44 UTC+2 skrev Jasen Betts: >> > >> On 2016-04-27, Tom Gardner <spamjunk@blueyonder.co.uk> wrote: >> > >> > On 27/04/16 14:04, Phil Hobbs wrote: >> > >> >>> Thanks Jeff, You know I miss all the command line stuff from the old DOS days. >> > >> >>> (It gave me this illusion, that I knew what I was doing with the 'puter.) >> > >> >> >> > >> >> No need to miss it, it's all still there. On my remaining Windows boxes I install Cygwin, which gives me a Unix-style (bash) command line. >> > >> > >> > >> > You may not need to do that much longer: MS is bringing bash and much >> > >> > more to windows >> > >> > Bash on Windows is Microsoft's solution to the problem and it aims to >> > >> > bring the entire Ubuntu userland, minus the Linux kernel to Windows. >> > >> > As a result, developers have access to the complete set of Ubuntu >> > >> > CLI tools and utilities. In layman's terms, it's akin to running >> > >> > Linux in Windows, natively. >> > >> > >> > >> > https://www.linux.com/news/bash-windows-what-does-it-mean >> > >> > and widely reported elsewhere, e.g. >> > >> > http://techcrunch.com/2016/03/30/be-very-afraid-hell-has-frozen-over-bash-is-coming-to-windows-10/ >> > >> > >> > >> > It will be interesting to see how it all pans out. >> > >> >> > >> Windows doesn't have "argv[]"... fork() neither SFAIK this could get messy. >> > >> >> > > >> > > argv[] as in command-line arguments? that is standard C on all platforms >> > >> > yeah, windows doesn't have that. instead every program gets a single >> > string and has to figure out where each argument starts and ends and >> > what it contains... different programs often do it differently. >> >> someone forgot to tell Microsoft that, because it is an array of strings >> like usual >> >> > >> > > cygwin implements fork on windows and native windows has a createProcess >> > > that does kinda the same thing so I'm sure MS could figure it out >> > >> > FAICT createproccess is not the same as fork, doesn't have the same >> > capablities... >> > >> > >> > I did somge googleing, it seems they're using a linux emulation layer >> > (like wine but pointing the opposite direction) so they can fake argv[] >> > in a self-consistent way without too much effort, fork will be trickier. >> > >> > > I don't understand why you think MS does not have such things? > > GetCommandLineW returns the command line string.. Pass that to the > CommandLineToArgvW to have you the argc and argv. yeah... i was stopped by the limitations of batch, not argv. > as for "Fork", thats not such a big deal. Windows can do all sorts of > things when starting processes. yeah, but fork isn't one of them. problem is they want to execute linux binaries. -- \_(ツ)_
[toc] | [prev] | [next] | [standalone]
| From | Jasen Betts <jasen@xnet.co.nz> |
|---|---|
| Date | 2016-05-13 12:35 +0000 |
| Message-ID | <nh4hmb$ib9$1@gonzo.alcatraz> |
| In reply to | #411386 |
On 2016-05-11, Lasse Langwadt Christensen <langwadt@fonz.dk> wrote: > Den onsdag den 11. maj 2016 kl. 13.31.22 UTC+2 skrev Jasen Betts: >> On 2016-04-29, Lasse Langwadt Christensen <langwadt@fonz.dk> wrote: >> > Den fredag den 29. april 2016 kl. 15.01.44 UTC+2 skrev Jasen Betts: >> >> On 2016-04-27, Tom Gardner <spamjunk@blueyonder.co.uk> wrote: >> >> > On 27/04/16 14:04, Phil Hobbs wrote: >> >> >>> Thanks Jeff, You know I miss all the command line stuff from the old DOS days. >> >> >>> (It gave me this illusion, that I knew what I was doing with the 'puter.) >> >> >> >> >> >> No need to miss it, it's all still there. On my remaining Windows boxes I install Cygwin, which gives me a Unix-style (bash) command line. >> >> > >> >> > You may not need to do that much longer: MS is bringing bash and much >> >> > more to windows >> >> > Bash on Windows is Microsoft's solution to the problem and it aims to >> >> > bring the entire Ubuntu userland, minus the Linux kernel to Windows. >> >> > As a result, developers have access to the complete set of Ubuntu >> >> > CLI tools and utilities. In layman's terms, it's akin to running >> >> > Linux in Windows, natively. >> >> > >> >> > https://www.linux.com/news/bash-windows-what-does-it-mean >> >> > and widely reported elsewhere, e.g. >> >> > http://techcrunch.com/2016/03/30/be-very-afraid-hell-has-frozen-over-bash-is-coming-to-windows-10/ >> >> > >> >> > It will be interesting to see how it all pans out. >> >> >> >> Windows doesn't have "argv[]"... fork() neither SFAIK this could get messy. >> >> >> > >> > argv[] as in command-line arguments? that is standard C on all platforms >> >> yeah, windows doesn't have that. instead every program gets a single >> string and has to figure out where each argument starts and ends and >> what it contains... different programs often do it differently. > > someone forgot to tell Microsoft that, because it is an array of strings > like usual Yeah according to msvc documentation it seems there's a way to escape any string I can think of such that any argv can be produced. it didn't seem so easy when I actually had to do it. could be because I was calling .bat files... >> > cygwin implements fork on windows and native windows has a createProcess >> > that does kinda the same thing so I'm sure MS could figure it out >> >> FAICT createproccess is not the same as fork, doesn't have the same >> capablities... >> >> I did somge googleing, it seems they're using a linux emulation layer >> (like wine but pointing the opposite direction) so they can fake argv[] >> in a self-consistent way without too much effort, fork will be trickier. > > with createprocess doing something similar to fork like a bicycle pump is similar to dynamite > and a third party, cygwin, implementing a full featured fork, I doubt it would > that difficult for MS add > if they don't already have it in Interix available for servers Iouldn't find anything that said a fully functional fork was available. Say I write a program that has state in memory and implement the save feature by forking a process to write the state to disk while the main process continues to run uninterrupted manipulating the state. cywin's going to stop me while it finds space in ram (or more likely the swap file) so it can duplicate all of the memory... -- \_(ツ)_
[toc] | [prev] | [standalone]
Back to top | Article view | sci.electronics.design
csiph-web