*BSD News Article 67461


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!metro!news.nsw.CSIRO.AU!mel.dit.csiro.au!munnari.OZ.AU!news.ecn.uoknor.edu!paladin.american.edu!zombie.ncsc.mil!news.mathworks.com!tank.news.pipex.net!pipex!dispatch.news.demon.net!demon!awfulhak.demon.co.uk!awfulhak.demon.co.uk!awfulhak.demon.co.uk!not-for-mail
From: brian@awfulhak.demon.co.uk (Brian Somers)
Newsgroups: comp.unix.misc,comp.unix.bsd.misc
Subject: Re: How to delete files within C programs
Followup-To: comp.unix.misc,comp.unix.bsd.misc
Date: 1 May 1996 13:46:30 +0100
Organization: Coverform Ltd.
Lines: 22
Message-ID: <4m7mf6$hv@anorak.coverform.lan>
References: <Oum-El-Kheir.Benkahla-3004961724540001@mac-ugm-3.imag.fr>
X-NNTP-Posting-Host: awfulhak.demon.co.uk
X-Newsreader: TIN [version 1.2 PL2]
Xref: euryale.cc.adfa.oz.au comp.unix.misc:22356 comp.unix.bsd.misc:893

Oum-El-Kheir Benkahla (Oum-El-Kheir.Benkahla@imag.fr) wrote:
:    I am searching a way for deleting files within C programs. I tried the
: exec command for executing rm (execlp("rm", "rm", "myfile", 0), which
: indeed deletes myfile but the problem here is that the exec command
: doesn't return on success. 
:    Is there another way to do this and return to the calling process ?

:     Thank you in advance.

: OB

: -- 
: Oum-El-Kheir BENKAHLA
: LGI_IMAG, 46, Av. Félix Viallet, 38031 Grenoble Cedex 01
: Tel. : 76.57.48.19
: Fax : 76.57.47.17

man unlink, man remove, man system

--
Brian <brian@awfulhak.demon.co.uk>
Don't _EVER_ lose your sense of humour....