Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

System Call Project

Hello everyone,
I'm trying to figure out to write a new system call just for the experence, but I'm sort of stuck about writing this one. Here is a description of it.
------------------------------------------------------------
Add a new system call
#include

int noopen(int remaining);

When the call is made only "remaining" open system calls can be made, the remaining+1st open call will fail.

The current value for "remaining" is inherited by child processes. A normal user can decrease "remaining" but never increase it. Root can increase "remaining", or send a -1 to remove any limit.

noopen() returns 0 if it is successful, -1 if it fails and sets the value of errno to indicate what was wrong - ENOOPENARG : illegal argument. ENOOPENERR : Can't increase the value of remaining
------------------------------------------------------------
What I'm trying to figure out is how to go about storing which processes have made this function call. This project is sort of messy. Thanks for taking your time to reading this.

Mark
Sign In or Register to comment.