Operating System - HP-UX
1834675 Members
2370 Online
110069 Solutions
New Discussion

OCD terminates prematurely

 
Raj Kotaru
Occasional Contributor

OCD terminates prematurely

Hello,

I have a C program that runs on a HP-UX B.10.20, 9000/820 series machine
and communictaes to a remote terminal server using DDFA and ocd.

The program spawns an ocd process and then
attempts to open the device file that was passed to the ocd via the
-f option. The invocation looks like:

/etc/ocd -n10.104.0.175 -f/dev/thordtcb1p15 -b1 -p14 -c/etc/pcf.binary.

Howver, the ocd dies prematurely and the info in the syslog tells me that this particular device file is already in use by process with id 0.

Apr 7 19:40:00 hpserv01 ocd[3548]: (107) ERROR: Pseudonym /dev/thordtcb1p15 in use by DDFA with process identifier 0
Apr 7 19:40:00 hpserv01 ocd[3548]: (105) ERROR: Pseudonym /dev/thordtcb1p15 unavailable
Apr 7 19:40:00 hpserv01 ocd[3548]: (199) ERROR: Terminating daemon

The process with id 0 is the swapper. I do not know how this process has come to lock /dev/thordtcb1p15, but my C program blocks when it attempts a
"read(/dev/thordtcb1p15, O_RDWR)". Has anyone experienced a problem like this before?

One suspicious aspect of the above invocation is that file /etc/pcf.binary, the configuration file passed to ocd does not exist.

If I attempt to use ocdebug, I do not get any more information. See below. The local log file created is also empty.

hpserv01:/TMS/SmartTrk/bin>/etc/ocdebug -n10.104.0.175 -f/dev/thordtcb1p15 -b1 -p15 -c/etc/ddfa/pcf.binary

Terminating parent successfully
Starting daemon
Made daemon process group leader
Opened system log file
Closed file descriptor 0
Closed file descriptor 1
hpserv01:/TMS/SmartTrk/bin>Opened local log file /var/adm/ocd3548
Logging going to system log file as well

hpserv01:/TMS/tmp>ls -l /var/adm/ocd3548
---------- 1 root bin 0 Apr 7 19:40 /var/adm/ocd3548
hpserv01:/TMS/tmp>



Is the file utmp.dfa used to lock the information mapping a DTC port to a process? Will deleting this file help?

Thanks
Raj