Merge pull request #972 from pmoura/add_pid_predicate

Add pid/1 predicate to the os library
This commit is contained in:
Mark Thom
2021-05-19 14:09:21 -06:00
committed by GitHub
3 changed files with 16 additions and 1 deletions

View File

@@ -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.