This is the mail archive of the
cygwin-apps@sources.redhat.com
mailing list for the Cygwin project.
two questions
- To: "cygapp" <cygwin-apps at sourceware dot cygnus dot com>
- Subject: two questions
- From: "Robert Collins" <robert dot collins at itdomain dot com dot au>
- Date: Sun, 16 Jul 2000 13:45:56 +1000
Hi,
first question. Is there anyway to have a console window close after a
program has forked, and the parent process returns?
example scenario: A user goes start|run,
c:\cygwin\usr\local\somebackgrounder.exe
this opens a console window
somebackgrounder now forks, the parent returns with 0, and the child process
stays in the background.
but the console window stays open?!
second question: does anyone know why argv[0] is different for the following
scenarios
1)Start|run, c:\cygwin\usr\local\program.exe
2)start|run, cmd (running win2k). then (from any drive)
"c:\cygwin\usr\local\program.exe"
in 1, argv[0] is C:/cygwin/usr/local/program.exe
in 2, argv[0] is /usr/local/program.exe
Note that bash was not the shell in 2! I'm quite happy to code around this
myself, but if someone wanted to provide a pointer as to where I should
place it I'm happy to code around it for cygwin..
The reason it's a issue, is that I want to call exec(argv[0],newswitches),
which the above behaviour scuttles..
Rob