[Ilugc] problem using popen with xinetd--VERY URGENT

  • From: raamanp@xxxxxxxxxxx (Raman.P)
  • Date: Tue, 1 Jun 2004 09:12:32 +0100 (BST)

 --- Uma Viswanathan <umavichu1@xxxxxxxxx> wrote: > Hi,

I am currently working on an application that receives a HTTP
request,processes it and sends back the response. Part of the
processing involves validation of the user and to see if the user
is running a particular process (whose name is hard coded as of
now). To see if the process is being run by the user, the
application does a popen to the shell command (which involves doing
a ps --User | cut ..|grep <process name>) and reads the response
from the pipe. 
 
The problem that I am facing is that reading from the pipe works
fine when the application is run as a standalone, but when we
register it as a service with xinetd and execute it, the reading
from the pipe fails. As an alternative, I tried using system()
command for the above scenario. However, that too fails when the
application is invoked via inetd. Please offer ur sugesstions to
overcome this problem...This is VERY URGENT for my project
completion. Please revert back at the earliest
 

try giving full path name of the commands like /bin/ps instead of ps.

Raman.P

________________________________________________________________________
Yahoo! India Matrimony: Find your partner online. 
http://yahoo.shaadi.com/india-matrimony/

Other related posts: