Hello all,
Can someone explain to me the advantage between using subshell over a function call in scripts? To me these are the same. Am I wrong to think this? (4 Replies)
I am having a problem getting the PID of a process I start in the background is a csh.
In tcsh and sh it's simple
$! give it to you
But in csh this just returns
Variable syntax
From the man page it should work but it doesn't????
Any help. (2 Replies)
consider the given prg.
main() {
.....
function1(); /* to write into a file or log */
printf(" ");
.....
}
when the control reaches function1(), it should get executed in the
background.At the same time main's printf(" ") statement should also get executed.i.e... (5 Replies)
hello All,
I need to invoke by perl script some program/command and monitor it for 5
minutes . In case it still running for more then 5 min I need to send a signal which will stop it.
I implemeted this as shown below by using eval & alarm
and I'd like to know if there is a better way to... (1 Reply)
Guys,
can you help me in killing the process which is running in back ground under for loop
I am not able to find the PID using ps -afx|grep <word in command I entered> (1 Reply)
Hi all,
I'm reading <advanced bash scripting> and there is a example to kill a background process in a limited time,as shown below:
#! /bin/bash
#set -n
TIMEOUT=$1
count=0
hanging_jobs & {
while ((count < TIMEOUT));do
eval ' && ((count = TIMEOUT))'
((count++))
sleep 1... (6 Replies)
Hello. I was wondering if someone can help me out with something. To simplify my life, I have written a tiny script to open an ssh tunnel through another linux host so that I can access the esxi hosts on that network using the client. For this I have to tunnel ports 443, 902, and 903. Here is what... (1 Reply)
Hey all,
Okay, this one is tricky and I'm not sure there is a niec way to do it, or indeed anyway to do it. The main issue revolves around timing out a hung ssh. I am doing this by creating a wrapper script for the ssh with the following requirements.
My requirements are:
Defineable... (5 Replies)
Here is some back ground on the script. The script is to poll an arbitrary number of DB's. To do this I am creating a function that takes the file_path to the DB and the min poll interval as arguments. The function will be called for each DB and then ran in the background. The function I was... (6 Replies)
Hello All,
I was looking into creating a script that would be used only to start a Daemon and create a lock file...
F.Y.I. It's for Nagios' NRPE Daemon Plugin...
Anyway when I run the command to start the Daemon (below):
/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
And... (14 Replies)
Discussion started by: mrm5102
14 Replies
LEARN ABOUT HPUX
xcreatesimplewindow
XCreateSimpleWindow() XCreateSimpleWindow()
Name
XCreateSimpleWindow - create an unmapped InputOutput window.
Synopsis
Window XCreateSimpleWindow(display, parent, x, y, width, height, border_width, border, background)
Display *display;
Window parent;
int x, y;
unsigned int width, height, border_width;
unsigned long border;
unsigned long background;
Arguments
display Specifies a pointer to the Display structure; returned from XOpenDisplay().
parent Specifies the parent window ID. Must be an InputOutput window.
x Specify the x and y coordinates of the upper-left pixel of the new window's border relative to the origin of the parent (inside
y the parent window's border).
width Specify the width and height, in pixels, of the new window. These are the inside dimensions, not including the new window's bor-
height ders, which are entirely outside of the window. Must be non-zero. Any part of the window that extends outside its parent window
is clipped.
border_width
Specifies the width, in pixels, of the new window's border.
border Specifies the pixel value for the border of the window.
background
Specifies the pixel value for the background of the window.
Returns
The window.
Description
XCreateSimpleWindow() creates an unmapped InputOutput subwindow of the specified parent window. Use XCreateWindow() if you want to set the
window attributes while creating a window. (After creation, XChangeWindowAttributes() can be used.)
XCreateSimpleWindow() returns the ID of the created window. The new window is placed on top of the stacking order relative to its sib-
lings. Note that the window is unmapped when it is created - use MapWindow to display it. This function generates a CreateNotify event.
The initial conditions of the window are as follows:
o The window inherits its depth, class, and visual from its parent. All other window attributes have their default values.
o All properties have undefined values.
o The new window will not have a cursor defined; the cursor will be that of the window's parent until the cursor attribute is set with
XDefineCursor() or XChangeWindowAttributes().
o If no background or border is specified, CopyFromParent is implied.
For more information, see Volume One, Chapter 2, X Concepts, and Volume One, Chapter 3, Basic Window Program.
Errors
BadAlloc
BadMatch
BadValue width or height is zero.
BadWindow Specified parent is an InputOnly window.
See Also
XCreateWindow(), XDestroySubwindows(), XDestroyWindow().
Xlib - Window Existence XCreateSimpleWindow()