Tcl Library Source Code

View Ticket
Login
Ticket UUID: 203aa0ea508c827ede4d37568620b2375478d3
Title: odie::processman should return exit codes of processes it manges
Type: RFE Version: 1.17 .03
Submitter: anonymous Created on: 2015-05-17 00:41:31
Subsystem: odie Assigned To: hypnotoad
Priority: 5 Medium Severity: Minor
Status: Open Last Modified: 2015-06-09 14:24:26
Resolution: Wont Fix Closed By: nobody
    Closed on:
Description:
It would be very nice to see the return code of processes that odie:processman controls- As I need to get the return codes out of my processes I have had to copy the process_list and check for dead processes myself every x seconds instead of using the built in onExit callback.

Thanks for writing such a cool package!


Also, the odie Category that this page http://core.tcl.tk/tcllib/doc/trunk/embedded/www/tcllib/files/modules/processman/processman.html#5 points to does not exist!
User Comments: hypnotoad added on 2015-06-09 14:24:26:
Well the processman was more intended for "fire and forget" sort of applications. Specifically it is used in the IRM to launch editor instances as well as external programs such as our Fortran based fire model. "Why it died" wasn't as important a question to ask as "Is it still running".

My gut worry is that the overhead of maintaining a channel is a much higher investment than simply forking a process and checking in on it occasionally via the process table. And as I use it in production already, I don't *really* want to much with that part of it works.

Let's compromise and build a new method called "launch" (as opposed to "spawn"). A launched application will use the [open |] mechanism, and you would be able to track it via [close]. We just need to provide some connective tissue to allow the rest of the processman API to know how to treat the two varieties.

anonymous (claiming to be aspect) added on 2015-06-09 12:04:33:
Using [open |] instead of [exec &] would make the child's
exit status available in the options dictionary at [close]
time.  Would such a change impede any functionality
present in this package?

hypnotoad added on 2015-06-08 15:09:49:

Kevin,

Returning the exit code of a spawned process would require plumbing down on the C level. And non-portable plumbing at that.

Though I agree, it would be really nice.

--Sean "The Hypnotoad" Woods


aku added on 2015-05-21 21:42:18:
categories updated. list of devs updated. proper assignments made.