PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: mpeppler at itf dot ch (Michael Peppler)
Subject: Re: socket problem
Date: Feb 1 1996 3:36PM

From: Richard Lee 
> 	We are running Perl 5.001 with sybperl 2, and having intermittent
> 	socket disconnect problems with the following codes. The connection
> 	will just drop in middle of transmission, which caused a PIPE signal.

[...deleted...]

> 	$ret = printf SL_LOANET_HANDLE "%s", $CLIENT_REQUEST ;
> 	......
> 	recv(SL_LOANET_HANDLE,$LOANET_RETURN,240,$FLAGS);

I wonder if that printf might be the problem... I haven't done much
socket() programming with Perl, but I wouldn't be surprised if printf
did some strange stuff, including buffering and the like. Maybe you
should use syswrite() instead, as in

	syswrite(SL_LOANET, $CLIENT_REQUEST, 240);

which actually calls write(2).

Michael