Clinton,

I was suspecting this.  An easier fix might be to document this in the book or 
an errata document.

Thanks,
David
----- Original Message ----
From: Clinton Jeffery <[EMAIL PROTECTED]>
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Sent: Sunday, April 15, 2007 4:03:18 AM
Subject: Re: [Unicon-group] problem with system() under windows XP

system() does whatever the underlying C compiler semantics do.  Under UNIX it 
does launch a shell in which to execute
the command you give it.  Under DOS and Windows it generally doesn't do that, 
but you can generally do it yourself via

system("command /C dir") or maybe system("cmd /C dir").  Bottom line: there is 
no dir.exe, it is an "internal command"
within command.com or cmd.exe but those executables usually have a way to 
invoke a single command (/C) and by the

way, we don't want to change Unicon system() to always invoke an Windows shell 
in order to do system(), but
I can almost see special-casing the internal commands so that the cmd /C stuff 
is automatically prepended.


Clint

On 4/14/07, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:David Gamey <
[EMAIL PROTECTED]> skribis:
> If I call system with something like "dir ... /s/b" or even just "dir" I get 
> a return of -1.  Calling it on a batch file containing the same command works 
> just fine.


Oh, wait, system should be running a shell, no? I haven't used the
windows or msdos version in years, so I don't know.




-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Unicon-group mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unicon-group




-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Unicon-group mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to