Re: tcl - exec will block the main thread if not return on Windows
- From: Alexandre Ferrieux <alexandre.ferrieux@xxxxxxxxx>
- Date: Tue, 30 Oct 2007 09:24:04 -0000
On Oct 30, 9:52 am, vian1...@xxxxxxxxxxxx wrote:
The exec manual said "To start an instance of notepad editing a file
without waiting for the user to finish editing the file: exec notepad
myfile.txt &", but I tried on my application, it throws an error that
"couldn't duplicate output handle: bad file number".
What's the problem?
On Unix, "exec vi myfile &" works well, I continue the operation on my
application without exiting vi.
On Windows, "exec notepad myfile.txt" will block my application, I
have to exit notepad before I can operate my application.
Does anyone know the reason?
Did you by any chance do something to stdout, like closing it ?
Or are you starting your app from outside a console, resulting in
somewhat invalid std channels ? In any case, I'd try
exec notepad < NUL: > NUL: 2> NUL: &
-Alex
.
- Prev by Date: Re: error extracting attachments with package mime - lost zeroes
- Next by Date: rotate tk canvas
- Previous by thread: wiki.tcl.tk/4 - great job!
- Next by thread: Re: tcl - exec will block the main thread if not return on Windows
- Index(es):
Relevant Pages
|