Hi, Could it be your umask?
Yoav Shapira Millennium Research Informatics
I don't think so... I've the standard 0022 umask... With the same umask (0022) jsvc works well with Debian Sarge/Sid, but doesn't work with Debian Woody (stable).
Horacio
-----Original Message----- From: Morus Walter [mailto:[EMAIL PROTECTED] Sent: Monday, July 19, 2004 5:18 AM To: Tomcat Users List Subject: Re: File.mkdirs() don't work if started with jsvc
Horacio de Oro writes:
Tomcat started with jsvc:
fileName = "/tmp/test/something" => DOESN'T WORKS fileName = "/tmp/onedir" => THIS WORKS!!!
So, the problem is: Tomcat started with jsvc on Debian Woody: - File.mkdirs() WORKS if it should make ONE directory. - File.mkdirs() DOESN'T WORKS if it should make MORE THAN ONE
directory.
If you ask me, this is a java problem not a tomcat problem.
I did another test: I extended the daemon sample 'SimpleDaemon' to create directories /tmp/bla/fasel and /tmp/blub using mkdirs (just after the line System.err.println("SimpleDaemon: started acceptor loop"); I added new File("/tmp/bla/fasel").mkdirs(); new File("/tmp/blub").mkdirs(); ) /tmp/bla/fasel is not created /tmp/blub is.
So tomcat doesn't seem to be involved in the failure. IMO the bug is either in java itself or in daemon. And it must be some weird interaction with system libraries (pthread,
libc)
since it occurs only on some systems.
After some further search I decided to look at javas and jsvc libraries and the only difference is, java uses libpthread, jsvc doesn't.
If one changes that (that is adds -lpthread to the linking of jsvc in daemon-1.0/src/native/unix/native/Makefile (that's autogenerated, but I didn't want to search through the autoconf/automake stuff for the
correct
place) jsvc: jsvc-unix.o libservice.a $(LDCMD) $(LDFLAGS) jsvc-unix.o libservice.a -lpthread -o
../jsvc
instead of jsvc: jsvc-unix.o libservice.a $(LDCMD) $(LDFLAGS) jsvc-unix.o libservice.a -o ../jsvc
the problem disapears. :-)
So the origin of the problem is somewhere in the details of debian
woodys
libc/libpthread.
I filed a bug report for commons daemon. http://issues.apache.org/bugzilla/show_bug.cgi?id=30177
Morus
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
