This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

BUG: 'cron' fails to stop with -i flag


I have installed 'cron' as a service using the following:
   cygrunsrv -I cron -d "CYGWIN cron" -p /usr/sbin/cron -a -D -e
"CYGWIN=server ntsec tty" -i
The -i flag is needed for certain cron job scripts.

It starts and runs fine using:
    cygrunsrv -S cron
A reading of the services shows:
    Service             : cron
    Display name        : CYGWIN cron
    Current State       : Running
    Controls Accepted   : Stop
    Command             : /usr/sbin/cron -D

However, when I try to stop it using:
    cygrunsrv -E cron
I get the following:

cygrunsrv: Error stopping a service: QueryServiceStatus:  Win32 error
1053:
The service did not respond to the start or control request in a timely
fashion.

'ps -a' shows the cron process is still present:
    3648       1    3648       3648    ?   18 20:59:40
/usr/bin/cygrunsrv
    3680    3648    3648       2108    ?   18 20:59:40 /usr/sbin/cron

A reading of the services shows:
    Service             : cron
    Display name        : CYGWIN cron
    Current State       : Stop Pending
    Controls Accepted   : Stop
    Command             : /usr/sbin/cron -D

I have to use 'kill' (i.e. 'kill `cat /var/run/cron.pid`') to remove the
process.

I have tried adding '-s TERM', '-s INT' and even '-s KILL' to the
install command:
   cygrunsrv -I cron -d "CYGWIN cron" -p /usr/sbin/cron -a -D -e
"CYGWIN=server ntsec tty" -i -s TERM
but none of them (not even '-s KILL') terminate the cron daemon when
trying to stop the service.

If I install without the -i flag, it starts and stops with no problems. 
(However, as mentioned, certain cron job script don't work properly.) 
Therefore, there is something about the use of the -i flag that is
causing the problem.

(cygcheck -s output attached.)
Cygwin Configuration Diagnostics
Current System Time: Thu Apr 06 16:47:50 2006

Windows 2000 Professional Ver 5.0 Build 2195 Service Pack 4

Path:	E:\cygwin\home\jhedden\bin
	E:\cygwin\usr\local\bin
	E:\cygwin\bin
	E:\cygwin\bin
	E:\cygwin\usr\X11R6\bin
	C:\Perl\bin
	C:\djgpp\bin
	C:\Program Files\WiX
	C:\Program Files\nant-0.85-rc3\bin
	C:\Program Files\apache-ant-1.6.3\bin
	C:\j2sdk1.4.2_08\bin
	C:\Program Files\Documentum\Shared
	C:\blp\API
	C:\oracle\ora92\bin
	C:\Program Files\Oracle\jre\1.3.1\bin
	C:\Program Files\Oracle\jre\1.1.8\bin
	C:\WINNT\system32
	C:\WINNT
	C:\WINNT\system32\WBEM
	C:\Program Files\cvsnt
	C:\dev-cpp\bin
	.

Output from E:\cygwin\bin\id.exe (nontsec)
UID: 78809(jhedden)      GID: 10513(Domain Users)
0(root)                  544(Administrators)      545(Users)
10513(Domain Users)

Output from E:\cygwin\bin\id.exe (ntsec)
UID: 78809(jhedden)      GID: 10513(Domain Users)
0(root)                  544(Administrators)      545(Users)
10513(Domain Users)

SysDir: C:\WINNT\system32
WinDir: C:\WINNT

USER = 'jhedden'
PWD = '/home/jhedden'
CYGWIN = 'server ntsec'
HOME = '/home/jhedden'
MAKE_MODE = 'unix'

Use '-r' to scan registry

a:  fd             N/A    N/A                    
c:  hd  NTFS     38161Mb  40% CP CS UN PA FC     
d:  cd             N/A    N/A                    
e:  hd  FAT32   114442Mb  16% CP    UN           EXTERNAL
f:  net NTFS    451498Mb  85% CP CS UN PA FC     
g:  net NTFS     10003Mb  57% CP CS UN PA FC     
h:  net NTFS     10003Mb  57% CP CS UN PA FC     
v:  net NTFS   2753169Mb  94% CP CS UN PA        shared
y:  net NTFS    225738Mb  82% CP CS UN PA FC     

.                                               /cygdrive  user    binmode,cygdrive
E:\cygwin                                       /          system  binmode
C:                                              /c         system  binmode
E:\cygwin/bin                                   /usr/bin   system  binmode
E:\cygwin/lib                                   /usr/lib   system  binmode
E:                                              /x         system  binmode
C:\Documents and Settings\jhedden\My Documents  /z         system  binmode
.                                               /cygdrive  system  binmode,cygdrive

Found: E:\cygwin\bin\awk.exe
Found: E:\cygwin\bin\bash.exe
Found: E:\cygwin\bin\cat.exe
Found: E:\cygwin\bin\cp.exe
Found: E:\cygwin\bin\cpp.exe
Found: C:\dev-cpp\bin\cpp.exe
Found: E:\cygwin\bin\crontab.exe
Found: E:\cygwin\bin\find.exe
Found: E:\cygwin\bin\gcc.exe
Found: C:\dev-cpp\bin\gcc.exe
Found: C:\dev-cpp\bin\gdb.exe
Found: E:\cygwin\bin\grep.exe
Found: E:\cygwin\bin\kill.exe
Found: E:\cygwin\bin\ld.exe
Found: C:\dev-cpp\bin\ld.exe
Found: E:\cygwin\bin\ls.exe
Found: E:\cygwin\bin\make.exe
Found: C:\dev-cpp\bin\make.exe
Found: E:\cygwin\bin\mv.exe
Found: E:\cygwin\bin\patch.exe
Found: E:\cygwin\bin\perl
Found: E:\cygwin\bin\rm.exe
Found: C:\dev-cpp\bin\rm.exe
Found: E:\cygwin\bin\sed.exe
Found: C:\djgpp\bin\sed.exe
Found: E:\cygwin\bin\ssh.exe
Found: E:\cygwin\bin\sh.exe
Found: E:\cygwin\bin\tar.exe
Found: E:\cygwin\bin\test.exe
Not Found: vi
Found: E:\cygwin\bin\vim.exe

 1173k 2006/03/28 E:\cygwin\bin\cygperl5_8.dll
    7k 2003/10/19 E:\cygwin\bin\cygcrypt-0.dll
   12k 2003/02/17 E:\cygwin\bin\cygioperm-0.dll
   56k 2005/07/09 E:\cygwin\bin\cygbz2-1.dll
  895k 2004/04/28 E:\cygwin\bin\cygdb-4.2.dll
 1156k 2004/04/28 E:\cygwin\bin\cygdb_cxx-4.2.dll
   19k 2003/03/22 E:\cygwin\bin\cyggdbm.dll
   28k 2003/07/20 E:\cygwin\bin\cyggdbm-3.dll
   15k 2003/07/20 E:\cygwin\bin\cyggdbm_compat-3.dll
   30k 2003/08/11 E:\cygwin\bin\cyggdbm-4.dll
   15k 2003/08/11 E:\cygwin\bin\cyggdbm_compat-4.dll
   21k 2001/06/20 E:\cygwin\bin\cygintl.dll
   22k 2001/12/13 E:\cygwin\bin\cygintl-1.dll
   37k 2003/08/10 E:\cygwin\bin\cygintl-2.dll
   45k 2001/04/25 E:\cygwin\bin\cygform5.dll
   26k 2001/04/25 E:\cygwin\bin\cygmenu5.dll
  156k 2001/04/25 E:\cygwin\bin\cygncurses++5.dll
  226k 2001/04/25 E:\cygwin\bin\cygncurses5.dll
   15k 2001/04/25 E:\cygwin\bin\cygpanel5.dll
   35k 2002/01/09 E:\cygwin\bin\cygform6.dll
   20k 2002/01/09 E:\cygwin\bin\cygmenu6.dll
  175k 2002/01/09 E:\cygwin\bin\cygncurses++6.dll
  202k 2002/01/09 E:\cygwin\bin\cygncurses6.dll
   12k 2002/01/09 E:\cygwin\bin\cygpanel6.dll
   48k 2003/08/09 E:\cygwin\bin\cygform7.dll
   29k 2003/08/09 E:\cygwin\bin\cygmenu7.dll
  224k 2003/08/09 E:\cygwin\bin\cygncurses7.dll
   19k 2003/08/09 E:\cygwin\bin\cygpanel7.dll
   22k 2002/06/09 E:\cygwin\bin\cygpopt-0.dll
   17k 2001/06/28 E:\cygwin\bin\cyghistory4.dll
  108k 2001/06/28 E:\cygwin\bin\cygreadline4.dll
   29k 2003/08/10 E:\cygwin\bin\cyghistory5.dll
  148k 2003/08/10 E:\cygwin\bin\cygreadline5.dll
   21k 2004/10/22 E:\cygwin\bin\cygminires.dll
   40k 2006/03/24 E:\cygwin\bin\cygform-8.dll
   21k 2006/03/24 E:\cygwin\bin\cygmenu-8.dll
  965k 2005/05/14 E:\cygwin\bin\cygdb-4.3.dll
 1240k 2005/05/14 E:\cygwin\bin\cygdb_cxx-4.3.dll
   41k 2005/08/29 E:\cygwin\bin\cyglber-2-2-7.dll
  176k 2005/08/29 E:\cygwin\bin\cygldap-2-2-7.dll
  188k 2005/08/29 E:\cygwin\bin\cygldap_r-2-2-7.dll
   78k 2004/10/13 E:\cygwin\bin\cygsasl2-2.dll
   65k 2005/08/23 E:\cygwin\bin\cygz.dll
  176k 2005/09/06 E:\cygwin\bin\cygpcre-0.dll
  299k 2005/09/06 E:\cygwin\bin\cygpcrecpp-0.dll
    6k 2005/09/06 E:\cygwin\bin\cygpcreposix-0.dll
   67k 2006/03/24 E:\cygwin\bin\cygncurses++-8.dll
  227k 2006/03/24 E:\cygwin\bin\cygncurses-8.dll
   12k 2006/03/24 E:\cygwin\bin\cygpanel-8.dll
   24k 2006/03/25 E:\cygwin\bin\cyghistory6.dll
  152k 2006/03/25 E:\cygwin\bin\cygreadline6.dll
  174k 2004/10/14 E:\cygwin\bin\cygexpat-0.dll
 1047k 2005/10/11 E:\cygwin\bin\cygcrypto-0.9.8.dll
  215k 2005/10/11 E:\cygwin\bin\cygssl-0.9.8.dll
 1108k 2005/10/17 E:\cygwin\bin\cygcrypto-0.9.7.dll
  231k 2005/10/17 E:\cygwin\bin\cygssl-0.9.7.dll
   48k 2005/11/19 E:\cygwin\bin\cygmagic-1.dll
   24k 2005/09/06 E:\cygwin\bin\cygltdl-3.dll
    7k 2005/11/20 E:\cygwin\bin\cygcharset-1.dll
  947k 2005/11/20 E:\cygwin\bin\cygiconv-2.dll
   31k 2005/11/20 E:\cygwin\bin\cygintl-3.dll
 1768k 2006/03/09 E:\cygwin\bin\cygwin1.dll
    Cygwin DLL version info:
        DLL version: 1.5.20
        DLL epoch: 19
        DLL bad signal mask: 19005
        DLL old termios: 5
        DLL malloc env: 28
        API major: 0
        API minor: 155
        Shared data: 4
        DLL identifier: cygwin1
        Mount registry: 2
        Cygnus registry name: Cygnus Solutions
        Cygwin registry name: Cygwin
        Program options name: Program Options
        Cygwin mount registry name: mounts v2
        Cygdrive flags: cygdrive flags
        Cygdrive prefix: cygdrive prefix
        Cygdrive default prefix: 
        Build date: Thu Mar 9 10:36:48 EST 2006
        Snapshot date: 20060309-10:35:06
        Shared id: cygwin1S4


Service             : cygserver
Display name        : CYGWIN cygserver
Current State       : Stopped
Command             : /usr/sbin/cygserver


Cygwin Package Information
Package              Version
_update-info-dir     00387-1
alternatives         1.3.20a-2
ash                  20040127-3
autoconf             2.59-2
autoconf2.1          2.13-1
autoconf2.5          2.59-2
automake1.9          1.9.6-1
base-files           3.7-1
base-passwd          2.2-1
bash                 3.1-4
bc                   1.06-2
binutils             20050610-1
byacc                1.9-1
bzip2                1.0.3-1
clear                1.0-2
coreutils            5.94-4
cron                 3.0.1-19
crypt                1.1-1
cvs                  1.11.21-1
cygrunsrv            1.15-1
cygutils             1.3.0-1
cygwin               1.5.19-4
cygwin-doc           1.4-3
diffutils            2.8.7-1
e2fsprogs            1.35-3
editrights           1.01-1
expat                1.95.8-1
file                 4.16-1
findutils            4.3.0-1
gawk                 3.1.5-4
gcc                  3.4.4-1
gcc-core             3.4.4-1
gcc-g++              3.4.4-1
gcc-mingw-core       20050522-1
gcc-mingw-g++        20050522-1
gdbm                 1.8.3-7
gnupg                1.4.2.1-1
grep                 2.5.1a-2
groff                1.18.1-2
gzip                 1.3.5-1
hexedit              1.2.10-1
ioperm               0.4-1
less                 381-1
libbz2_1             1.0.3-1
libcharset1          1.9.2-2
libdb4.2             4.2.52-1
libdb4.2-devel       4.2.52-1
libdb4.3             4.3.28-1
libgdbm              1.8.0-5
libgdbm-devel        1.8.3-7
libgdbm3             1.8.3-3
libgdbm4             1.8.3-7
libiconv             1.9.2-2
libiconv2            1.9.2-2
libintl              0.10.38-3
libintl1             0.10.40-1
libintl2             0.12.1-3
libintl3             0.14.5-1
libltdl3             1.5.20-2
libncurses-devel     5.5-2
libncurses5          5.2-1
libncurses6          5.2-8
libncurses7          5.3-4
libncurses8          5.5-2
libopenldap2_2_7     2.2.26-2
libpcre0             6.3-1
libpopt0             1.6.4-4
libreadline4         4.1-2
libreadline5         4.3-5
libreadline6         5.1-5
libsasl2             2.1.19-3
libsasl2-devel       2.1.19-3
libtool1.5           1.5.20-2
login                1.9-7
m4                   1.4.4-1
make                 3.80-1
man                  1.5p-1
mingw-runtime        3.9-2
minires              1.00-1
minires-devel        1.00-1
mktemp               1.5-3
more                 2.11o-3
ncurses              5.5-2
openldap             2.2.26-2
openldap-devel       2.2.26-2
openssh              4.3p2-3
openssl              0.9.8a-1
openssl-devel        0.9.8a-1
openssl097           0.9.7i-1
patch                2.5.8-8
perl                 5.8.7-5
pilrc                3.2
ping                 1.0-1
prc-tools            2.3
readline             5.1-5
run                  1.1.8-1
rxvt                 2.7.10-6
sed                  4.1.5-1
tar                  1.15.1-4
tcltk                20060202-1
termcap              20050421-1
terminfo             5.5_20060323-1
texinfo              4.8-1
unzip                5.50-5
util-linux           2.12r-2
vim                  6.4-4
w32api               3.6-1
wget                 1.10.2-1
which                1.7-1
zip                  2.3-6
zlib                 1.2.3-1
Use -h to see help about each section
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]