/usr/lib/swipl/library/ext/clib/unix.pl
All Application Manual Name SummaryHelp

  • ext
    • clib
      • socket.pl -- Network socket (TCP and UDP) library
      • uid.pl
      • unix.pl -- Unix specific operations
        • fork/1
        • fork_exec/1
        • exec/1
        • wait/2
        • kill/2
        • pipe/2
        • dup/2
        • detach_IO/1
        • detach_IO/0
        • prctl/1
        • sysconf/1
      • syslog.pl -- Unix syslog interface
      • memfile.pl
      • time.pl -- Time and alarm library
      • uri.pl -- Process URIs
      • filesex.pl -- Extended operations on files
      • uuid.pl -- Universally Unique Identifier (UUID) Library
      • sha.pl -- SHA secure hashes
      • process.pl -- Create processes and redirect I/O
      • hash_stream.pl -- Maintain a hash on a stream
      • md5.pl -- MD5 hashes
      • rlimit.pl
      • mallocinfo.pl -- Memory allocation details
      • prolog_stream.pl -- A stream with Prolog callbacks
      • crypt.pl
      • streaminfo.pl
      • udp_broadcast.pl -- A UDP broadcast proxy
      • cgi.pl -- Read CGI parameters
      • streampool.pl -- Input multiplexing
 fork_exec(+Command) is det
Fork (as fork/1) and exec (using exec/1) the child immediately. This behaves as the code below, but bypasses the check for the existence of other threads because this is a safe scenario.
fork_exec(Command) :-
      (   fork(child)
      ->  exec(Command)
      ;   true
      ).