Merge pull request #972 from pmoura/add_pid_predicate
Add pid/1 predicate to the os library
This commit is contained in:
@@ -14,7 +14,8 @@
|
||||
|
||||
:- module(os, [getenv/2,
|
||||
setenv/2,
|
||||
unsetenv/1]).
|
||||
unsetenv/1,
|
||||
pid/1]).
|
||||
|
||||
:- use_module(library(error)).
|
||||
:- use_module(library(charsio)).
|
||||
@@ -33,6 +34,10 @@ unsetenv(Key) :-
|
||||
must_be_env_var(Key),
|
||||
'$unsetenv'(Key).
|
||||
|
||||
pid(PID) :-
|
||||
can_be(integer, PID),
|
||||
'$pid'(PID).
|
||||
|
||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
For now, we only support a restricted subset of variable names.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user