Socket strangess on SysV derivatives

Socket strangess on SysV derivatives

Post by Coranth Gryph » Sat, 01 Apr 1995 04:00:00



Hi. I am developing on various *NIX's using sockets for IPC.
I have run into a problem with all of them (specifically, IRIX 5.2
HP-UX A.09.01, Solaris 2.3, SunOS 4.1.3), except FreeBSD 2.0
(hence the cross-posts).

Summary of Project:
The spawner sits in a loop, connecting (as a client) to a database server
(which we also wrote) using TCP sockets. It gets info from the server about
jobs needing to run (kinda like "at"), and forks a copy of itself to run them
(using "exec") . It traps SIGCHLD  (using "signal" or "sigset" as apropos)
and uses "waitpid" to get the exit status of the child.

The problem:
When the SIGCHLD occurs during the middle of a socket read or write,
on everything execept FreeBSD, the program looses data that is being
sent over the socket. This results in garbage information (except on
IRIX which results in a seg-fault [untracable]).  When I do not trap
the signal (using "sigignore") everything works fine.

Additional Info:
I wrote a test suite which is a simplified version of the above.
It shows the same garbage results on Solaris 2.3, but works fine
on IRIX or HP-UX. Needless to say, it works fine on FreeBSD.

I've tried running things in the de*, but it (gdb) gets confused
when it (the program) does the context switch for the signal, after which
I can't get any useful information.

Does anyone out there have ANY ideas about this?

Reply by email or follow-up to comp.protocols.tcp-ip
Thanx in advance.

-coranth

----------------------------------------------------+-----------------------+

                                                    |  need-to-know basis.
USMail: MSG,Inc., 10 Corporate Place                |
        Burlington, MA  01803-5168                  | You do not currently
Phone: (617) 273-2820   FAX: (617) 272-1068         |  need to know.
Disclaimer: They would never acknowledge I said it. +-----------------------+

 
 
 

1. TLI, t_kopen, kernel sockets, SysV

Can anyone point me in the direction of code that uses SysV kernel TLI?
For example, calling t_kopen()

--
[Trim the no-bots from my address to reply to me by email!]
[ Do NOT email-CC me on posts. Pick one or the other.]

The word of the day is mispergitude

2. C++

3. socket.h on SYSV

4. Token Ring INstallation

5. Server Sockets in C++ with SysV IPC?

6. NIC sends but can't receive?!?!?!

7. socket exceptions on SysV.4

8. mpeg encode problems

9. SuSE 6.3 blue strangess

10. Solaris operating system: BSD or Sys. V derivative ?

11. What happened to gCAD, the GNUified Varkon derivative?

12. Novell is trying to Sell a derivative of Linux

13. modifying linux for proprietary hardware (walnut derivative)