POSIX system calls: kill, time, brk, getpid, getpgrp, pause, pipe, sync, getuid, rename

Here are some POSIX system calls:

s = kill(pid, signal): By using this system call a user sends a signal to a process. When the process is ready for the signal then signal handle is run and when it is not ready, then the process is terminated.

seconds = time(&seconds): It is used for getting elapsed time since Jan 1 , 1970.

size = brk(addr): It is used for setting size of data segment.

pid = getpid(): For returning process id of the caller.

pid = getpgrp(): For returning id of process group of the caller.

s = pause(): It is used for suspending caller until next signal.

s = pipe(&fd[0]): Used for creating a pipe.

s = sync(): It is used for flushing all cache blocks.

uid = getuid(): It is used for retrieving uid of a caller.

s = rename(old, new): It is used for renaming a file.

Leave a Reply