How do I write a function of some commands of shell (UNIX) in C language? E.g what is the source code of the exit function? How can we write its function in C lanugage?
OR
For example; exit command: Implement the exit command that quits the shell. (how to do this/ from which link/book ; a concept can be taken?)
and similarly For pwd command: Implement the pwd command that prints the user’s current working directory.
exitis necessarily a shell built-in.