Sponsored Content
Top Forums Programming Machine dependent problems when using Sockets. Post 302569569 by Corona688 on Monday 31st of October 2011 07:40:20 PM
Old 10-31-2011
It says 'socket operation on non-socket'. Somehow a non-socket got put in there...

You should print the FD of the socket you're sending to, and system("ls -l /proc/self/fd");

I suspect a buffer got overrun somewhere and the FD list corrupted with something unexpected. A buffer overrun would be very compiler dependent.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Editor dependent error?

Hi all, i did typed the following code in vi and executed it. #!/bin/sh //notice the blank line here. DATA=test echo "$DATA" There was no problem. I then deleted the file using the rm command. I used ultraedit typed in the same file. , FTP it in and i got the following output :... (2 Replies)
Discussion started by: new2ss
2 Replies

2. HP-UX

how can i make two dependent jobs into cron?

Hi all, How can i make two dependent jobs into crontab? means after the first job the second job should run in a single crontab entry in unix. (1 Reply)
Discussion started by: megh
1 Replies

3. Solaris

pkgrm without removing the dependent packages

Hi all, Is there any option to remove a package without removing the dependent packages.... ie, i need to remove a package, while trying to remove by using pkgrm command it says as some dependent packages also will get removed, i dont want to remove those dependent packages. (1 Reply)
Discussion started by: judi
1 Replies

4. Shell Programming and Scripting

Shell scripting problems - Commands not on local machine

Hello all- I have done a lot of searching tonight, but all leads seem to be dead ends. Forgive me if this has been covered, but I've searched the forum and the internet. I am having trouble building a shell script which uses SSH to login to our schools 1024 cluster grid. The issue that I am... (1 Reply)
Discussion started by: Sagan
1 Replies

5. Programming

shell scripting problems involving operations with remote machine

Hi, i have been developing a shell script to transfer a set of files from one ubuntu system to another. Task: while executing the script the files ( ls, dir, cat) in the source machine should transfer to destination machine(at /home/mac/mac/bin) While the script is executed once again, It... (0 Replies)
Discussion started by: srijith
0 Replies

6. Slackware

Context dependent symlinks

Ive got multiple PCs, sharing an NFS mounted home dir. For certain apps I would like to keep the config files host specific. Easy solution is to create symlinks to local folders for configs. Ideally I would still want the .config files to reside in the user home folder. Is it possible to... (2 Replies)
Discussion started by: agentrnge
2 Replies

7. UNIX for Advanced & Expert Users

AIX Dependent Module could not be loaded

I am encountering the above error , even after setting the environment variables correctly AFAIK. I've found sources that say LIBPATH is the shared library variable , and others that say LIB_PATH, so I set both: ========================= root@lipossrp01ga: # echo $gtm_dist ... (6 Replies)
Discussion started by: Clovis_Sangrail
6 Replies

8. AIX

Dependent modules libc.a and libpthreads.a

Hello I am trying to install ActivePerl Pro Studio and I am seeing the following errors. Could not load program ./setup: Symbol resolution failed for setup because: Symbol ___memcmp (number 1) is not exported from dependent module /usr/lib/libc.a(shr.o). ... (2 Replies)
Discussion started by: flagman5
2 Replies

9. Shell Programming and Scripting

Script to Start services based on dependent services on other AIX machine

Hi, I just started working on a script. After my research, i found a command which can help me: AIM: To build a script which starts the services (Services 1) on server 1 automatically whenever its down. And it has a dependency on other service (Service 2) on Server 2. So my script has to... (4 Replies)
Discussion started by: draghun9
4 Replies

10. IP Networking

Problems and doubts with sockets and timeouts

Hi! I need some help to understand a little bit more the behaviour about socket and TCP connections... Here is my problem I have a client and a server that were written in python. The server program wait until a message arrive and then print the message but if the message not arrive in a second... (2 Replies)
Discussion started by: Kovalevski
2 Replies
SOCKET_SET_NONBLOCK(3)							 1						    SOCKET_SET_NONBLOCK(3)

socket_set_nonblock - Sets nonblocking mode for file descriptor fd

SYNOPSIS
bool socket_set_nonblock (resource $socket) DESCRIPTION
The socket_set_nonblock(3) function sets the O_NONBLOCK flag on the socket specified by the $socket parameter. When an operation (e.g. receive, send, connect, accept, ...) is performed on a non-blocking socket, the script will not pause its execu- tion until it receives a signal or it can perform the operation. Rather, if the operation would result in a block, the called function will fail. PARAMETERS
o $socket - A valid socket resource created with socket_create(3) or socket_accept(3). RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 socket_set_nonblock(3) example <?php $socket = socket_create_listen(1223); socket_set_nonblock($socket); socket_accept($socket); ?> This example creates a listening socket on all interfaces on port 1223 and sets the socket to O_NONBLOCK mode. socket_accept(3) will immediately fail unless there is a pending connection exactly at this moment. SEE ALSO
socket_set_block(3), socket_set_option(3), stream_set_blocking(3). PHP Documentation Group SOCKET_SET_NONBLOCK(3)
All times are GMT -4. The time now is 07:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy