07-14-2014
The definition of $! is "Expands to the process ID of the most recently executed background (asynchronous) command."
But since I assume your while loop runs after using MyProg without &, then MyProg must be forking itself into the background and therefore the shell hasn't a way to know the PID anyway, even if it backgrounds MyProg.
./MyProg & pid=$!
$pid may end up being 1234, but MyProg does a fork() and continues running at 1238 ... How would we know that number?
This User Gave Thanks to neutronscott For This Post:
10 More Discussions You Might Find Interesting
1. IP Networking
Hi all
Is there a command that I can use to close out open ports?
I did a netstat - a -p and got a long list of ports open (see sample below). I have disabled the some of the applications from /etc/services/. But there are still applications listening on certain ports.
I need to know how to... (6 Replies)
Discussion started by: skotapal
6 Replies
2. Programming
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
3. UNIX for Dummies Questions & Answers
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
4. AIX
I'm writing some software tests, & one of my test cases is to prevent an address space from closing a data file (file is closed & a new one opened every 15 minutes).
I can't remove or rename the file while it's being written to, any other ideas to prevent a file from being closed - or at least... (4 Replies)
Discussion started by: jasahl
4 Replies
5. UNIX for Dummies Questions & Answers
Hi,
is there any graphical tool for to see the solaris unix resource usages like cpu usage,memory,disk i.o..etc?
thanks (0 Replies)
Discussion started by: rags_s11
0 Replies
6. UNIX for Dummies Questions & Answers
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
7. UNIX and Linux Applications
Hi,
I want to invoke(run) a graphical application remotely, and the display should be in remote itself. (no X redirect).i want to do this through ssh.
like if i login to a remote machine and run firefox it should display there itself.
how can i do this..? (2 Replies)
Discussion started by: madhusudankh
2 Replies
8. Shell Programming and Scripting
Hi guys,
i need to write a shell script that will close file descriptors from /proc/pid/fd
will calling exec 4<&- solve the problem ?
thanks in advance :) (15 Replies)
Discussion started by: alpha_romeo
15 Replies
9. Solaris
I don't expect any quick answers, but if people have links to resources I can investigate I'd be extremely appreciative. Here is what we have today:
The "application" is a multi-process train control system that uses the Unix desktop, currently CDE, several motif-based applications and sound,... (8 Replies)
Discussion started by: paz9
8 Replies
10. Shell Programming and Scripting
I have been having an extremely annoying problem. For the record, I am relatively new at this. I've only been working with unix-based OS's for roughly two years, mostly Xubuntu and some Kali. I am pretty familiar with the BASH language, as that's the default shell for debian. Now, I've made this... (16 Replies)
Discussion started by: Huitzilopochtli
16 Replies
LEARN ABOUT X11R4
libbonoboui-2.3
libbonoboui-2.3(3) Introduction to Library Functions libbonoboui-2.3(3)
NAME
libbonoboui-2 - the Bonobo graphical library
DESCRIPTION
The libbonoboui-2 library provides a set of APIs for creating reusable graphical components. The APIs for implementing and embedding con-
trols and using mergable menus and toolbars are the most commonly used parts of the library.
To access the API documentation, you must install the developer version of the package.
FILES
The following files are used by this application:
/usr/lib/libbonoboui-2.sBonobo graphical shared library
/usr/share/gtk-doc/html Location of developer documentation
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWgnome-component |
+-----------------------------+-----------------------------+
|Interface stability |External |
+-----------------------------+-----------------------------+
SEE ALSO
libbonobo-2(3), libgtk-x11-2.0(3), libbonobo-activation(3)
NOTES
Written by Mark McLoughlin, Sun Microsystems Inc., 2003, 2004.
SunOS 5.10 31 Aug 2004 libbonoboui-2.3(3)