Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.electronics.design > #411830

Re: WHOA! Microsoft strikes again...

From Jasen Betts <jasen@xnet.co.nz>
Newsgroups sci.electronics.design
Subject Re: WHOA! Microsoft strikes again...
Date 2016-05-13 20:56 +0000
Organization "JJ's own news server"
Message-ID <nh5f13$na1$1@gonzo.alcatraz> (permalink)
References (10 earlier) <6d4f8841-e0a2-4ff0-88e0-2c51f9b38329@googlegroups.com> <ngv34m$moc$1@gonzo.alcatraz> <7qKdncDNyYHRzK7KnZ2dnUU7-XvNnZ2d@supernews.com> <nh4fvm$i35$1@gonzo.alcatraz> <mvednYDltdGVcajKnZ2dnUU7-UnNnZ2d@supernews.com>

Show all headers | View raw


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.



-- 
  \_(ツ)_

Back to sci.electronics.design | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

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

csiph-web