...
# Wait for the process to end
set ::meshparts::twapi_pid($pid) ""
::twapi::wait_on_handle $hproc -executeonce 1 -async [list ::meshparts::GlobalVarSetFromTwapiCallback ::meshparts::twapi_pid($pid) ""] vwait ::meshparts::twapi_pid($pid)
...
in order to catch a potential timing issue in that theThanks! I'll try that.
wait_on_handle operation completes before the vwait.
By using "after idle" you enforce an additional iteration
of the event loop.
Please always specify*how* it fails: are there error messages? Does it
block somehow? Does it return wrong results?
Dito: what does 'works' mean? No more error messages? No blocking?
Which results?
I think you need to close some of these in the parent after spawning the child, see chan manpage, last paragraph cited:
Always a good idea to build callbacks via [list] instead of "".Yes I konw. It's just that I switch between both. I use "" only in the
# Start the part generation process
set res [::twapi::create_process "" -cmdline $cmdline -returnhandles 1 -inherithandles 1 -stdchannels [list $processStdin $processStdoutErr $processStdoutErr]]
The only thing that is common to the messages is this: "Das system kann
die angegebene Datei nicht finden" which means "The system cannot find
the specified file."
Am 04.03.2026 um 12:09 schrieb Ralf Fassel:
Please always specify*how* it fails: are there error messages? Does it
block somehow? Does it return wrong results?
Sorry, normally I specify that but in this case I'm very unsure if those messages are relevant, as I wrote.
The only thing that is common to the messages is this: "Das system kann
die angegebene Datei nicht finden" which means "The system cannot find
the specified file."
meshparts <[email protected]> wrote:
# Start the part generation process
set res [::twapi::create_process "" -cmdline $cmdline -returnhandles 1
-inherithandles 1 -stdchannels [list $processStdin $processStdoutErr
$processStdoutErr]]
One of the error messages, which **should** have been in this message,
you finally included in a followup (always remember that none of us
here can read your mind over USENET):
The only thing that is common to the messages is this: "Das system kann
die angegebene Datei nicht finden" which means "The system cannot find
the specified file."
Given this, what is the contents, and type, of "$cmdline".
You will very likely get this exact error if $cmdline is a plain
string, and if the first parameter therein is a path containing one or
more space characters somewhere. Note the caution in the twapi docs
over "create_process":
Caller should ensure that CMDLINE is quoted appropriately.
So I suspect your failure message on this one PC because this one user
has a directory naming setup where $cmdline contains a path with spaces.
I see however, that the OP is using twapi, which likely doesn't haveI'm waiting for a result from the customer, then I'll have a log file
this problem. However, here is how I would capture the command lines of
all programs being launched - even if they exit immediately.
So I suspect your failure message on this one PC because this one userWe tested already aganist that. It happens with any directory even
has a directory naming setup where $cmdline contains a path with spaces.
It can be something as stupid as a user profile directory containing
spaces or non-latin1 characters (e.g. the user has the login André or a Chinese locale....)
I'd try to print the parameters for exec instead of executing. Then
compare between the main thread and the parallel thread. Also compare
the contents of env() and the working directory
Am 04.03.2026 um 14:05 schrieb Rich:
So I suspect your failure message on this one PC because this one userWe tested already aganist that. It happens with any directory even
has a directory naming setup where $cmdline contains a path with spaces.
without spaces.
Besides: Why is it happening only in a subprocess, not in the main
process?
How should we know? This is the first time in this thread you'veNot true!
actually told us it does not happen in the main process. If you want
help, you have to provide the relevant information for us to help.
If the exact same fork of a process is failing only in a thread, thatI will know more when the user sends the the log file.
says that something environment wise may be different between the
thread and the main process. So check that the windows environment
variables are the same between main and thread (esp. the PATH
environment variable).
Am 05.03.2026 um 14:29 schrieb Rich:
How should we know? This is the first time in this thread you'veNot true!
actually told us it does not happen in the main process. If you want
help, you have to provide the relevant information for us to help.
See my original post:
"In order to provide an workarround, I changed the first step so that
that command is executed directly in the main thread instead in a
parallel thread. This works! "
Am 05.03.2026 um 14:29 schrieb Rich:
If the exact same fork of a process is failing only in a thread, thatI will know more when the user sends the the log file.
says that something environment wise may be different between the
thread and the main process. So check that the windows environment
variables are the same between main and thread (esp. the PATH
environment variable).
He failed to do so until now...
I didn't see if you said that this occurs all the time or intermittently.It's happening all the time, but only on that one machine.
Am 05.03.2026 um 20:49 schrieb et99:^^^^^^^^^^^^^^^^^^^^^^^^
I didn't see if you said that this occurs all the time or intermittently.
It's happening all the time, but only on that one machine.
I just got the log from the user.
I'll get back to you with a resolution hopefully.
Which is the part that very much points to/something/ specific to thatYes, I know.
one machine. Either path names with spaces or utf-8 characters that
are not handled correctly all the way through, or PATH= setting
differences.
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,099 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 492373:54:30 |
| Calls: | 14,106 |
| Calls today: | 2 |
| Files: | 187,124 |
| D/L today: |
1,511 files (693M bytes) |
| Messages: | 2,496,031 |