Sponsored Content
Top Forums Programming Client accidently close when the server crash Post 302521876 by Loic Domaigne on Thursday 12th of May 2011 03:14:09 PM
Old 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

linux server crash

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

server crash

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

Solaris Server Crash

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

crash dump server for red hat ent 4

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

Client/Server Socket Application - Preventing Client from quitting on server crash

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

Crash error on my unix server

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

how to configure netdump to copy the crash in the server itself??

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

[C] close server after user input

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

Ssh to Solaris 10 server - close connection

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

Script to collect log files in case of server crash

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
Mojo::IOLoop::Server(3pm)				User Contributed Perl Documentation				 Mojo::IOLoop::Server(3pm)

NAME
Mojo::IOLoop::Server - Non-blocking TCP server SYNOPSIS
use Mojo::IOLoop::Server; # Create listen socket my $server = Mojo::IOLoop::Server->new; $server->on(accept => sub { my ($server, $handle) = @_; ... }); $server->listen(port => 3000); # Start and stop accepting connections $server->start; $server->stop; DESCRIPTION
Mojo::IOLoop::Server accepts TCP connections for Mojo::IOLoop. EVENTS
Mojo::IOLoop::Server can emit the following events. "accept" $server->on(accept => sub { my ($server, $handle) = @_; ... }); Emitted safely for each accepted connection. ATTRIBUTES
Mojo::IOLoop::Server implements the following attributes. "accepts" my $accepts = $server->accepts; $server = $server->accepts(10); Number of connections to accept at once, defaults to 10. "reactor" my $reactor = $server->reactor; $server = $server->reactor(Mojo::Reactor::Poll->new); Low level event reactor, defaults to the "reactor" attribute value of the global Mojo::IOLoop singleton. METHODS
Mojo::IOLoop::Server inherits all methods from Mojo::EventEmitter and implements the following new ones. "listen" $server->listen(port => 3000); Create a new listen socket. Note that TLS support depends on IO::Socket::SSL and IPv6 support on IO::Socket::INET6. These options are currently available: "address" Local address to listen on, defaults to all. "backlog" Maximum backlog size, defaults to "SOMAXCONN". "port" Port to listen on. "tls" Enable TLS. "tls_ca" Path to TLS certificate authority file. "tls_cert" Path to the TLS cert file, defaults to a built-in test certificate. "tls_key" Path to the TLS key file, defaults to a built-in test key. "generate_port" my $port = $server->generate_port; Find a free TCP port, this is a utility function primarily used for tests. "start" $server->start; Start accepting connections. "stop" $server->stop; Stop accepting connections. SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>. perl v5.14.2 2012-09-05 Mojo::IOLoop::Server(3pm)
All times are GMT -4. The time now is 10:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy