Ah, yes, another thing:
o What happens when the process writes a lot of data, so that the stdout pipe gets full? I suspect it will hang until the time out, whereas it could finish successfully had there only been someone to read the data from the pipe.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-09-20 00:39: Subject: Contribution
Nice! What is LMTP?
Regarding create_nbprocess:
o Have considered passing the extra arguments through the mapping instead? To me it seems cleaner now when Process.create_process already has left position-based argument passing in favor of a mapping.
o I also note that create_nbprocess bluntly overrides the "stdin" and "stdout" arguments. Preferably it shouldn't, but if it has to then it must be mentioned.
Btw, what's the reason for supplying an stdin pipe at all?
o Ideally I'd like to see this functionality directly in Process.create_process, but I guess it's a bit too much for you to integrate it on the C level. Maybe we could rename the current Process.create_process to something like Process._create_process and then add a Pike level wrapper with this and other goodies?
o You don't need to do remove_call_out of the call out itself inside it; they are one-shot.
o Avoid storing a reference to the object inside itself (i.e. the "process" variable). That makes a circular reference which means more work for the gc. (In 7.5 there's a special hack that avoids counting such references to itself, but it's good practice to try to avoid it anyway since it's not always that hack can discover a cyclic reference.)
/ Martin Stjernholm, Roxen IS