programming help
Hi,
first of all, sorry for asking this here, but I've tried and it's just
not working.....
Can somebody please help me in writing a little program (pseudo-code
below)? I don't care if it's in C or Perl, or C++ for that mather...
This program will be setgid news, and the program that will be executed
in the background has to be able to write in a directory that is setgid
news (this program itself too btw. cos it has to be able to create a
lockfile there and rename and unlink some stuff there). It's output
should go to /dev/null (stdout as well as stderr). The last program
executed should execute with the users own permissions. It is also
interactive.
pseudo-code:
if (! exists FILE) or (FILE is older then 1 week) {
if ! locked FILE # maybe another process is already
# doing the same
{
start_background_process {
create lockfile
execute another_program
remove lockfile
}
}
}
execute_program(our_command_line_options)
Thanx for all the help I get
Maarten
_______________________________________________________________________
| Maarten Boekhold, Faculty of Electrical Engineering TU Delft, NL |
| boekhold@cindy.et.tudelft.nl boekhold@gopher.library.tudelft.nl |
| Take life as a party! |
-----------------------------------------------------------------------
Reply to: