Different Result using ps -efW (Manual & Cron)

Corinna Vinschen corinna-cygwin@cygwin.com
Thu Jun 20 13:07:00 GMT 2013


On Jun 20 01:22, Jun Iriola wrote:
> Hi,
>> I made a simple script that should detect if a certain service is running or not.  Said script will run via cron.
>> When I tested it and executed it manually in the command prompt, it list all Cygwin and Windows processes. But when I put it in cron, the number of services detected were not the same. Account used is the same during manual execution and also on cron.
>> To get the list of services, I use this command /usr/bin/ps -efW.
>> Do you have any idea why such behavior?  Help is very much appreciated.  Thanks.

It's probably related to your user token's permissions. See
http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-setuid-overview
Try using method 3, it should give full, equivalent access as in
interactive mode.
Corinna
-- 
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /