05-12-2011
I'm glad that I won't end-up maintaining your code...
I played with it a bit, took me some time to get the client working without crash:
- A Pthread_attr_init is missing for rx (Client.c:218)
- Your client must be aware that a server may close the TCP connection brutally (RST segment). In this case, you'll get 0 on read() or SIGPIPE on the next write(). The way you usually get around this is to ignore SIGPIPE and watch for errno EPIPE when write() fails.
- There is likely more problems with your code.
HTH, Loïc
This User Gave Thanks to Loic Domaigne For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi
I faced a problem while booting linux which is as follows;-
*************************************************
Inode 146180 has illegal block(s)
xauth:error in locking authority file /home/root/.Xauthority
Fatal Server Error:
Could not create lock file in /tmp/tXo-lock
... (1 Reply)
Discussion started by: Abhishek
1 Replies
2. UNIX for Dummies Questions & Answers
Our SUn Solaris Server has crashed second time in 2 days, reason is not known , we are trying to determine what could have gone wrong, any ideas, the power supply seems to be fine, there is no response from keyboard,monitor etc and we had to do a hot boot yesterday..
Any suggestions what could be... (9 Replies)
Discussion started by: knarayan
9 Replies
3. UNIX for Advanced & Expert Users
We have had a server (Solaris 2.6) hardisk crash. When booting the server we get:
ok> boot -S
Boot Device: /sbus/espdmc@e, 8400000/esp@e,8800000/sd@0,0
short read 0x2000 chars read
disk read error
The only way we can get into the console is to
ok> boot cdrom
whereby everything (e.g.... (3 Replies)
Discussion started by: Breen
3 Replies
4. Linux
Is it true that you can't have the crash dump server/client on the same server?
I know I've installed Nagios open source before, I though it's only for that kind of thing. I never though that Red hat ent 4 would be like client/server on the crash dump.
if someone is having problem with high... (0 Replies)
Discussion started by: itik
0 Replies
5. Programming
Problem
- Linux Client/Server Socket Application: Preventing Client from quitting on server crash
Hi,
I am writing a Linux socket Server and Client using TCP protocol on Ubuntu 9.04 x64.
I am having problem trying to implement a scenario where the client should keep running even when the... (2 Replies)
Discussion started by: varun.nagpaal
2 Replies
6. SCO
Hi there.
Well i have a really bad problem with my server:
UnixWare Version 5 Release 7
The system crash :wall: and show the error:
Panic: Kernel-mode address fault on user address 0x00000004 :eek:
If anyone knows about the reason of this error please give me a help
Sorry by my english.... (3 Replies)
Discussion started by: danilosevilla
3 Replies
7. Red Hat
hi,
i would like to configure netdump, but saving the var/crash in the server itself, not in another server.
could anybody tell me if this is possible?
thanks (4 Replies)
Discussion started by: pabloli150
4 Replies
8. Programming
i must close server after a specific user input, such as FINE, if i put a test inside function "maiuscolatore" i receive an error on second recv of client. why?
below there are code of client and server:
CLIENT:
#include <stdlib.h>
#include <stdio.h>
#include... (0 Replies)
Discussion started by: tafazzi87
0 Replies
9. Solaris
Can ssh to server. Asks for password.
Then seems to time out and close the connection. Any ideas?
---------- Post updated at 09:30 AM ---------- Previous update was at 07:51 AM ----------
Here is output from ssh -vvv -l user <IPaddress>
debug3: packet_send2: adding 64 (len 59 padlen 5... (4 Replies)
Discussion started by: psychocandy
4 Replies
10. UNIX for Dummies Questions & Answers
Environmnet: HP-UX B.11.31 U ia64
RDBMS: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
Question:
When server hangs or node evicts, we open up tickets with Oracle Support and Oracle Support ask for some list of log files.
Currently we can not use the... (2 Replies)
Discussion started by: Siva SQL
2 Replies
LEARN ABOUT DEBIAN
gearman::server
Gearman::Server(3pm) User Contributed Perl Documentation Gearman::Server(3pm)
NAME
Gearman::Server - function call "router" and load balancer
DESCRIPTION
You run a Gearman server (or more likely, many of them for both high-availability and load balancing), then have workers (using
Gearman::Worker from the Gearman module, or libraries for other languages) register their ability to do certain functions to all of them,
and then clients (using Gearman::Client, Gearman::Client::Async, etc) request work to be done from one of the Gearman servers.
The servers connect them, routing function call requests to the appropriate workers, multiplexing responses to duplicate requests as
requested, etc.
More than likely, you want to use the provided gearmand wrapper script, and not use Gearman::Server directly.
METHODS
new
$server_object = Gearman::Server->new( %options )
Creates and returns a new Gearman::Server object, which attaches itself to the Danga::Socket event loop. The server will begin operating
when the Danga::Socket runloop is started. This means you need to start up the runloop before anything will happen.
Options:
port
Specify a port which you would like the Gearman::Server to listen on for TCP connections (not necessary, but useful)
create_listening_sock
$server_object->create_listening_sock( $portnum )
Add a TCP port listener for incoming Gearman worker and client connections.
start_worker
$pid = $server_object->start_worker( $prog )
($pid, $client) = $server_object->start_worker( $prog )
Fork and start a worker process named by $prog and returns the pid (or pid and client object).
SEE ALSO
gearmand
perl v5.10.1 2010-01-18 Gearman::Server(3pm)