Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!adm!drears@ardec.arpa From: drears@ardec.arpa (Dennis G. Rears (FSAC)) Newsgroups: comp.unix.wizards Subject: Re: C - development under UNIX - XENIX Message-ID: <13573@brl-adm.ARPA> Date: 6 May 88 18:49:12 GMT Sender: news@brl-adm.ARPA Lines: 42 Michael Deutsch writes: MD>These are questions for "C" and "UNIX" hackers. MD> MD>Your answer to all of these or a few will be greatly appreciated. MD> MD>1. A UNIX function call equivalent to: "mkdir" command is??? mkdir(2) is available on some unixes. If it is not available on yours try mknod(2). You must be root to run this call though. MD>2. A programm running with "setuid" privilege, i.e.: -rwsr-xr-x MD> tries to create directory and fails when executed by non-root, MD> however, it works when executed by root, why??? Is the program set to the right owner? MD> MD>3. How to issue an "lp/lpr" command from the program without MD> diagnostic popping up on the terminal??? Redirect stdin and stderr to /dev/null or some other file. MD> MD>4. Which header file or type contains info on the file, i.e. (size, MD> date created, date modified, number of links, etc.). MD> Try /usr/include/sys/stat.h. The system call would be stat(2) and fstat(2). I can't help with the other stuff now. I help this helps. Dennis -------------------------------------------------------------------------- ARPA: drears@ardec-ac4.arpa UUCP: ...!uunet!ardec-ac4.arpa!drears AT&T: 201-724-6639 Snailmail: Box 210, Wharton, NJ 07885 Flames: /dev/null Reincarnation: newton!babbage!patton!drears Work: SMCAR-FSS-E, Dennis Rears, Bldg 94, Picatinny Ars, NJ 07806 --------------------------------------------------------------------------