Re: Start_Process_Search error detection



David Shochat <shochatd@xxxxxxxxx> writes:

Posix/Ada, package Posix_Process_Primitives, includes a procedure
Start_Process_Search which searches for the requested program using
the value of the PATH environment variable. My question is, how do
you detect that the search failed (or will fail)? The package spec
we have is virtually devoid of documentation. Checking the returned
process id does not work. I get a nonzero process id even when I
pass a fictitious name. Also, no exception is raised. I could parse
$PATH and check each directory, but there must be a better way. This
is Apex on Solaris.

I haven't got any documentation either, but the Florist implementation
of POSIX.Process_Primitives.Start_Process_Search will give you a
negative value in the formal parameter Child, if the creation of a new
process failed. If the creation didn't fail, you can use
POSIX.Process_Primitives.Wait_For_Chilt_Process to see if the child
process exited with the status Failed_Creation_Exit.

Greetings,

Jacob
--
"The early bird may get the worm, but the second mouse gets the cheese!"
.



Relevant Pages

  • Re: Yes, we get to point out Renes exaggerations about RosAsm, Again
    ... There has been documentation for fasm for... ... What does that statement have to do with FASM's documentation quality? ... documentation, tutorials, and books supporting your assembler. ... There are many things you fail to understand. ...
    (alt.lang.asm)
  • Re: how do professional PHP developers handle defaults for function parameters?
    ... If something is going to fail, ... someone who calls a function with wrong arguments is a bad programmer. ... When you need a new feature, just extend the baseclass, and if your classes are properly decoupled, this change won't affect the rest of the program. ... Documentation should document behaviour, not syntax. ...
    (comp.lang.php)
  • Re: The Schneider Scam
    ... You can't fail somebody for driving, ... him the practice time, or you don't allow him to complete the course. ... I don't know about a dumbell, since I asked you to e-mail me documentation. ... First of all Schneider training isn't free, ...
    (misc.transport.trucking)
  • Re: which thread to create gui
    ... > laid down the law about setVisible, pack and the EDT. ... it's almost certain not to fail." ... That documentation is correct, as ... sequential order. ...
    (comp.lang.java.gui)
  • Re: No panic - but .. Y2K + 4
    ... >>documentation to support this statement about 'most systems which did date ... we didn't want to waste time enlarging date fields if ... >fly - so it probably would fail, but not because of the date. ... >This week I was using the Unisys MCP Log Analyzer program. ...
    (comp.lang.cobol)