02-09-2010
Strange Problem
Hi All,
I am encountering an unexpected problem while running my process, using daemon placed in /etc/init.d/.
I have a process that is opening shared library using dlopen.
When I run my process on the command line, it is able to open the library. But when I used daemon to run my process, I encountered an error - "Fail to open library. failed to map segment from shared object: Permission denied."
I have ensured that I am running daemon from root user.
I am not able to figure out the cause for the same. please share if someone knows the solution for the same.
Thanks in advance
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I¡¯m a network operator, mine is an IBM PC server 320, operating system SCO unix 3.2v4.2, triton 3.1 of Baan. Recently, my server went dead every a few hours, no sign & signal shows malfunction suddenly. It looks like a sudden power failure, but the indicator of main power supply is on. Normal... (1 Reply)
Discussion started by: lyhsm
1 Replies
2. UNIX for Dummies Questions & Answers
I did an installation of Redhat 7.1 and it seem to install smoothly. I go and reboot and I get the following message:
"INIT: Id "x" respawing too fast: disabled for 5 minutes"
The screen flashes 4 times every 10 seconds or so.
I can't seem to figure why this does this. It might be a simple... (2 Replies)
Discussion started by: forjohnny
2 Replies
3. UNIX for Dummies Questions & Answers
Hi..
Some of my application were not running properly due to lack of virtual memory.....so wht i did add one free harddisk as swap file system...and increased the swap memory..
But since than my root file system is showing 100% full thr is no space left...is thr any link between these two..... (1 Reply)
Discussion started by: Prafulla
1 Replies
4. Linux
I have installed Fedora Core on a Toshiba Satellite Pro4600 laptop recently I have experienced a rather mysterious problem if I touch anything specially the keyboard or mouse I see this stuff “67yujhnmyyy” straight away some time it won't stop for while like this... (5 Replies)
Discussion started by: kemobyte
5 Replies
5. Shell Programming and Scripting
I am using SunOS 5.9 and I don't know why all my commands are getting executed as if an extra 'enter' has been pressed.
What could be the reason and how to correct it?
Please help.
Asty (2 Replies)
Discussion started by: Asty
2 Replies
6. Shell Programming and Scripting
Well, my script started off to do what i wanted. Now, i think its not recognizing the pattern so its not moving anything.
What i have to do is execute my script command for the move to take effect. So i did that and yayy it worked.
Strange thing is that my DESTDIR was empty to begin with.... (2 Replies)
Discussion started by: oxoxo
2 Replies
7. UNIX for Dummies Questions & Answers
Hi,
in my environment we have several server with rlogin passwordless login enabled, now there is a problem to setup this with a hpux server. i have check the .rhosts file and kerberos key are all setup properly and permission is correct, even other user id on the server can login without... (3 Replies)
Discussion started by: robertngo
3 Replies
8. UNIX for Dummies Questions & Answers
windowsxp:192.168.0.11
fedora14:192.168.0.12, running smb server
I have disabled selinux.
user list of fedora14:
jone (wihch is created when install fedora14, with password 'jone')
jone2 (which is added by hand, with password 'jone2')
I added jone and jone2 as samba users using 'smbpasswd... (1 Reply)
Discussion started by: vistastar
1 Replies
9. Shell Programming and Scripting
hello all,
i am having problem in accessing a directory.I dont think its a permission issue.can anyone help me out. I am using korn sell
code:
$ ls -ltr sc*
lrwxrwxrwx 1 essbase essbase 21 Oct 8 2010 sc_ssp -> /work/nfs/nas2/sc_ssp
$ cd sc_ssp
ksh: sc_ssp: not found
$ (6 Replies)
Discussion started by: manid
6 Replies
LEARN ABOUT FREEBSD
daemon
DAEMON(8) BSD System Manager's Manual DAEMON(8)
NAME
daemon -- run detached from the controlling terminal
SYNOPSIS
daemon [-cfr] [-p child_pidfile] [-P supervisor_pidfile] [-u user] command arguments ...
DESCRIPTION
The daemon utility detaches itself from the controlling terminal and executes the program specified by its arguments. Privileges may be low-
ered to the specified user.
The options are as follows:
-c Change the current working directory to the root (``/'').
-f Redirect standard input, standard output and standard error to /dev/null.
-p child_pidfile
Write the ID of the created process into the child_pidfile using the pidfile(3) functionality. The program is executed in a spawned
child process while the daemon waits until it terminates to keep the child_pidfile locked and removes it after the process exits.
The child_pidfile owner is the user who runs the daemon regardless of whether the -u option is used or not.
-P supervisor_pidfile
Write the ID of the daemon process into the supervisor_pidfile using the pidfile(3) functionality. The program is executed in a
spawned child process while the daemon waits until it terminates to keep the supervisor_pidfile locked and removes it after the
process exits. The supervisor_pidfile owner is the user who runs the daemon regardless of whether the -u option is used or not.
-r Supervise and restart the program if it has been terminated.
-u user
Login name of the user to execute the program under. Requires adequate superuser privileges.
If the -p, -P or -r option is specified the program is executed in a spawned child process. The daemon waits until it terminates to keep the
pid file(s) locked and removes them after the process exits or restarts the program. In this case if the monitoring daemon receives software
termination signal (SIGTERM) it forwards it to the spawned process. Normally it will cause the child to exit, remove the pidfile(s) and then
terminate.
The -P option is useful combined with the -r option as supervisor_pidfile contains the ID of the supervisor not the child. This is especially
important if you use -r in an rc script as the -p option will give you the child's ID to signal when you attempt to stop the service, causing
daemon to restart the child.
EXIT STATUS
The daemon utility exits 1 if an error is returned by the daemon(3) library routine, 2 if child_pidfile or supervisor_pidfile is requested,
but cannot be opened, 3 if process is already running (pidfile exists and is locked), otherwise 0.
DIAGNOSTICS
If the command cannot be executed, an error message is displayed on standard error unless the -f flag is specified.
SEE ALSO
setregid(2), setreuid(2), daemon(3), exec(3), pidfile(3), termios(4), tty(4)
HISTORY
The daemon utility first appeared in FreeBSD 4.7.
BSD
September 13, 2013 BSD