![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| inetd process | binums | HP-UX | 4 | 06-01-2006 01:59 PM |
| how to convert from korn shell to normal shell with this code? | forevercalz | Shell Programming and Scripting | 21 | 11-23-2005 02:18 AM |
| How to process multiple files in Korn Shell | stevefox | Shell Programming and Scripting | 3 | 11-22-2005 06:39 AM |
| checking for a running process from korn cron | jph | Shell Programming and Scripting | 2 | 05-01-2005 01:27 AM |
| KORN Shell - Spawn new shell with commands | frustrated1 | Shell Programming and Scripting | 2 | 04-20-2005 03:23 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Run a process through inetd using korn shell!!!
Hi,
I am trying to run a process through inetd using ksh. The entry in /etc/inetd.conf is Process_Name tcp nowait root /home/user/script script The script is as follows /usr/bin/ksh -c /path/process Recycling inetd services is successfully completed. But when the process is accessed by any application, the log file shows the following error: inetd[8555]: exec /home/user/script: Exec format error When i execute the script from the command line, it executes successfully and the process is started. Could someone please help me with this? Also how can I confirm that the process is running in ksh? Thanks in Advance! Vishi |
|
||||
|
Hi,
Thanks for the reply. I tried out your suggestion. Now there is no Exec format error. But when any application accesses this service and runs an internal command, the log file says it tried to execute it in the bourne shell. for eg; An application accesses this process and runs a command jr % the log file says /bin/sh: jr: not found. It will only run if it is executed in the korn shell. Is there any way of confirming whether the said process is spawned using the korn shell or the bourne shell? Any help would be appreciated. Thanks in advance. Vishi |
|
||||
|
Is the script now saying....
Code:
#!/bin/ksh /usr/bin/ksh -c /path/process Try switching running from /bin/sh in your terminal session, set SHELL to /bin/sh and then test your program. What is your PATH set to in a terminal session and in the environment running inetd? Put "PATH=/usr/bin:/bin" near the start of your script and add paths as needed. |
|
||||
|
Is the script now saying....
Code: #!/bin/ksh /usr/bin/ksh -c /path/process Yes, thats what the script looks like now. What is $SHELL set to as it is executing? Does your script /path/process also have #!/bin/ksh or similar at it's start? /path/process is not a script, it is an executable and runs in the background when it is called through inetd.conf Try switching running from /bin/sh in your terminal session, set SHELL to /bin/sh and then test your program. When I run it from my command line, the process starts up, but according to the script "/usr/bin/ksh -c /path/process" it should be spawned in the korn shell. How do i verify this? Thanks. Vishi |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|