Next: , Up: The Operating System Library   [Index]


13.14.1 Operating System Functions

access

integer access(text p, integer m);

is access(2)(p, m).

chdir

void chdir(text p);

calls chdir(2) for p.

chmod

void chmod(text p, integer m);

calls chmod(2) for p and m.

chown

void chown(text p, integer u, integer g);

calls chown(2) for p, u and g.

dup

integer dup(integer o);

calls dup(2) for o.

dup2

integer dup2(integer o, integer n);

calls dup2(2) for o and n.

fstat

object fstat(integer d, &...);

calls fstat(2) for d, sets every other argument starting with the third to the struct stat field indicated by the preceding argument. All output arguments are expected ‘integer’s or ‘date’s, all field selection arguments are expected ‘integer’s and in the stat field definitions set.

See Stat Field Definitions.

is the struct stat field indicated by the last field selection argument (an ‘integer’ or a ‘date’) if there was one, 0 (an ‘integer’) otherwise.

See ‘stat’ for examples.

getpid

integer getpid(void);

is getpid(2)().

getppid

integer getppid(void);

is getppid(2)().

kill

void kill(integer p, integer s);

calls kill(2) for p and s.

mkdir

void mkdir(text p, integer m);

calls mkdir(2) for p and m.

raise

void raise(integer s);

calls raise(3) for s.

remove

void remove(text p);

calls remove(3) for p.

rename

void rename(text p, text q);

calls rename(2) for p and q.

rmdir

void rmdir(text p);

calls rmdir(2) for p.

sleep

void sleep(integer s);

calls sleep(3) for nonnegative s, does nothing for negative time indications.

stat

object stat(text p, &...);

calls stat(2) for p, sets every other argument starting with the third to the struct stat field indicated by the preceding argument. All output arguments are expected ‘integer’s or ‘date’s, all field selection arguments are expected ‘integer’s and in the stat field definitions set.

See Stat Field Definitions.

is the struct stat field indicated by the last field selection argument (an ‘integer’ or a ‘date’) if there was one, 0 (an ‘integer’) otherwise.

Examples:

    stat("stripped.jpg", ST_SIZE)
    integer s, m;
    date d;

    stat("stripped.jpg", ST_SIZE, s, ST_MODE, m, ST_MTIME, d);

usleep

void usleep(integer u);

calls usleep(3) for nonnegative u, does nothing for negative time indications.


Next: Operating System Definitions, Up: The Operating System Library   [Index]