1834136 Members
2485 Online
110064 Solutions
New Discussion

Re: execlp failed

 
Karen Shen_1
Occasional Advisor

execlp failed

The last line of my "lpstat -t" output says: "lpstat: execlp failed". What could be wrong? How do I fix it?
2 REPLIES 2
A. Clay Stephenson
Acclaimed Contributor

Re: execlp failed

Without a bit more data, it's difficult to know. An exec (execlp is but one of the variants) can fail for many reasons including permissions, lack of swap space or memory limits, among others.

What you need to do is as soon as the command fails, issue an "echo $?" command. That will display the exit status of the last command.
You the compare that numerical value with those lists in /usr/include/sys/errno.h for more clues.

This should actually become a conditioned response for you when an UNIX command fails.
If it ain't broke, I can fix that.
S.K. Chan
Honored Contributor

Re: execlp failed

It's very likely your printer status file is corrupted. The file is /usr/spool/lp/pstatus. You said "last line" .. from your lpstat -t output find out what is the 1st printer name that you see (from the bottom) after the "execlp.." line error. Try to remove that printer and configure it back to see if it helps. You can use SAM for this. If that failed you have 2 other choices ..
- Restore the pstatus file from backup.
- Use SAM to save all of your printer configuration, then remove all of the printers and finally restore the spooler configuration back.