View Single Post

  #3 (permalink)  
Old 10-14-2005, 10:25 AM
sweta's Avatar
sweta sweta is offline
Contributors
User
 
Join Date: Feb 2005
Location: New Delhi
My distro: Suse, RHEL, Vista
Posts: 154
Rep Power: 4
sweta will become famous soon enough
Default

well monk has pointed you right direction, howerver you should use popen() function insted of system()/exec() if you need to call a rm or other shell script. It is bit secure to use popen() then system(), IMPO

Quote:
The popen() function opens a process by creating a pipe, forking, and invoking the shell. Since a pipe is by definition unidirectional, the type argument may specify only reading or writing, not both; the resulting stream is correspondingly read-only or write-only.
__________________
Friends - v-nessa - missyAdmin - LinuxChix
Reply With Quote