Sponsored Content
Full Discussion: Record PID when launching
Top Forums Shell Programming and Scripting Record PID when launching Post 302369681 by yankee428 on Monday 9th of November 2009 09:15:01 AM
Old 11-09-2009
thanks, that'll work
 

10 More Discussions You Might Find Interesting

1. Programming

printing ppid,child pid,pid

question: for the below program i just printed the value for pid, child pid and parent pid why does it give me 6 values? i assume ppid is 28086 but can't figure out why there are 5 values printed instead of just two! can someone comment on that! #include<stdio.h> #define DIM 8 int... (3 Replies)
Discussion started by: a25khan
3 Replies

2. UNIX for Dummies Questions & Answers

Session PID & socket connection pid

1. If I use an software application(which connects to the database in the server) in my local pc, how many PID should be registered? Would there be PID for the session and another PID for socket connection? 2. I noticed (through netstat) that when I logged in using the my software application,... (1 Reply)
Discussion started by: pcx26
1 Replies

3. Shell Programming and Scripting

Launching Several Shells....

Hi, I need to create a shell that launches several shells named for example svspush (that does nothing but wait) and record their pid in a file. Any inputs please. Thanks, Marconi (1 Reply)
Discussion started by: marconi
1 Replies

4. UNIX for Dummies Questions & Answers

Need to get pid of a process and have to store the pid in a variable

Hi, I need to get the pid of a process and have to store the pid in a variable and i want to use this value(pid) of the variable for some process. Please can anyone tell me how to get the pid of a process and store it in a variable. please help me on this. Thanks in advance, Amudha (7 Replies)
Discussion started by: samudha
7 Replies

5. Shell Programming and Scripting

Launching shell from another

hi, I have shell script ( say A.sh) that launches another shell script ( say B.sh) on the server. In shell script A.sh, if i call B.sh as . B.sh <-- it doesnt work, err file not found . ./B.sh <-- it doesnt work, err file not found ./B.sh <-- works why so? BTW the file exists at the... (4 Replies)
Discussion started by: sjc
4 Replies

6. AIX

Error launching c++ executable

Hi everybody, I have compiled my code based on the ALPS libraries () and CMake build system with IBM compiler xlC 11.1 on AIX 6.1 at the latest patch level running on an IBM SP Power 6 machine for high-performance computing. When I run the executable I receive this error message: -bash-3.2$... (2 Replies)
Discussion started by: JessicaAlfonsi
2 Replies

7. Red Hat

Help in launching firefox.

Hi, -- I am new to linux, please bear with my tech terms. I am using Red Hat 4.1.2-48 (Linux version 2.6.18-194.11.1.el5) for the project. This is a remote server and I do not use any GUI. Now I need to install a product that requires me to launch firefox from linux. when i am trying... (3 Replies)
Discussion started by: vj8436
3 Replies

8. Shell Programming and Scripting

How to compare current record,with next and previous record in awk without using array?

Hi! all can any one tell me how to compare current record of column with next and previous record in awk without using array my case is like this input.txt 0 32 1 26 2 27 3 34 4 26 5 25 6 24 9 23 0 32 1 28 2 15 3 26 4 24 (7 Replies)
Discussion started by: Dona Clara
7 Replies

9. Ubuntu

Launchers Not Launching

Some of my .desktop launchers aren't working. When I try to execute it from the main menu nothing happens. When I try to launch it from a terminal I get the following: $ /usr/share/applications/qjoypad.desktop /usr/share/applications/qjoypad.desktop: line 1: Here are the contents of the launcher:... (0 Replies)
Discussion started by: Deluge
0 Replies

10. Shell Programming and Scripting

Extract timestamp from first record in xml file and it checks if not it will replace first record

I have test.xml <emp><id>101</id><name>AAA</name><date>06/06/14 1811</date></emp> <Join><id>101</id><city>london</city><date>06/06/14 2011</date></join> <Join><id>101</id><city>new york</city><date>06/06/14 1811</date></join> <Join><id>101</id><city>sydney</city><date>06/06/14... (2 Replies)
Discussion started by: vsraju
2 Replies
PCAP_GET_SELECTABLE_FD(3PCAP)											     PCAP_GET_SELECTABLE_FD(3PCAP)

NAME
pcap_get_selectable_fd - get a file descriptor on which a select() can be done for a live capture SYNOPSIS
#include <pcap/pcap.h> int pcap_get_selectable_fd(pcap_t *p); DESCRIPTION
pcap_get_selectable_fd() returns, on UNIX, a file descriptor number for a file descriptor on which one can do a select() or poll() to wait for it to be possible to read packets without blocking, if such a descriptor exists, or -1, if no such descriptor exists. Some network devices opened with pcap_create() and pcap_activate(), or with pcap_open_live(), do not support select() or poll() (for example, regular network devices on FreeBSD 4.3 and 4.4, and Endace DAG devices), so -1 is returned for those devices. Note that in: FreeBSD prior to FreeBSD 4.6; NetBSD prior to NetBSD 3.0; OpenBSD prior to OpenBSD 2.4; Mac OS X prior to Mac OS X 10.7; select() and poll() do not work correctly on BPF devices; pcap_get_selectable_fd() will return a file descriptor on most of those versions (the exceptions being FreeBSD 4.3 and 4.4), but a simple select() or poll() will not indicate that the descriptor is readable until a full buffer's worth of packets is received, even if the read timeout expires before then. To work around this, an application that uses select() or poll() to wait for packets to arrive must put the pcap_t in non-blocking mode, and must arrange that the select() or poll() have a timeout less than or equal to the read timeout, and must try to read packets after that timeout expires, regardless of whether select() or poll() indicated that the file descriptor for the pcap_t is ready to be read or not. (That workaround will not work in FreeBSD 4.3 and later; however, in FreeBSD 4.6 and later, select() and poll() work correctly on BPF devices, so the workaround isn't necessary, although it does no harm.) Note also that poll() doesn't work on character special files, including BPF devices, in Mac OS X 10.4 and 10.5, so, while select() can be used on the descriptor returned by pcap_get_selectable_fd(), poll() cannot be used on it those versions of Mac OS X. Kqueues also don't work on that descriptor. poll(), but not kqueues, work on that descriptor in Mac OS X releases prior to 10.4; poll() and kqueues work on that descriptor in Mac OS X 10.6 and later. pcap_get_selectable_fd() is not available on Windows. RETURN VALUE
A selectable file descriptor is returned if one exists; otherwise, -1 is returned. SEE ALSO
pcap(3PCAP), select(2), poll(2) 5 April 2008 PCAP_GET_SELECTABLE_FD(3PCAP)
All times are GMT -4. The time now is 09:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy