Sponsored Content
Top Forums Programming How to know there are multiple instances inside application itself,not through ssh Post 302353526 by Sedighzadeh on Tuesday 15th of September 2009 01:48:17 PM
Old 09-15-2009
How to know there are multiple instances inside application itself,not through ssh

hi,

As you know, in Windows Programming, in WinMain method you will give n argument which you can know if this is another instance of the application or just the fresh execution.
How this functionality can be achieved in Linux application? Most of suggestions i have seen here in threads are done through ssh and shell scripting not inside application itself.

Regards,
Behzad
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

multiple instances of syslogd - is it possible?

I would like to start up multiple instances of syslog daemon. I am having a little difficulty. Is this at all possible? I have separate syslog.conf1.... syslog.conf5 files. I have linked the daemon to separate files syslogd1 ... syslogd5 I have arranged the rcd.2 start/stop scripts for... (9 Replies)
Discussion started by: Gary Dunn
9 Replies

2. UNIX for Dummies Questions & Answers

Multiple file instances

I am capturing text based reports with a specific program, which works no problem. However, since I send report warehouse output as they are migrated from the database software, on occasion when two capture process' initiate simultaneously, the capture file locks up. Is there a way to setup (in... (1 Reply)
Discussion started by: gozer13
1 Replies

3. Shell Programming and Scripting

looping a array inside inside ssh is not working, pls help

set -A arr a1 a2 a3 a4 # START ssh -xq $Server1 -l $Username /usr/bin/ksh <<-EOS integer j=0 for loop in ${arr} do printf "array - ${arr}\n" (( j = j + 1 )) j=`expr j+1` done EOS # END ========= this is not giving me correct output. I... (5 Replies)
Discussion started by: reldb
5 Replies

4. Shell Programming and Scripting

detecting multiple instances

Hi Gurus I have a requirement like this. i use solaris OS.. if there are 2 instances of the same ksh file running in the directory, i need to kill the ksh file that started to run latest. suppose ragha.ksh starts running thru cron in abc/xyz directory now ragha.ksh started running by any... (3 Replies)
Discussion started by: ragha81
3 Replies

5. Solaris

ypbind - multiple instances starting

I have built this Solaris 10 server, uses NIS. When the server starts up, two instances of ypbind start. This prevents the server from binding to any domain. The SMF in turn prevents any other network services (sshd and the like) from starting up. Has anyone seen this problem before? (0 Replies)
Discussion started by: blowtorch
0 Replies

6. Shell Programming and Scripting

Multiple instances of a job.

Could you please let me know how to create/make a multiple instances of a job/process in ksh(shell scripting). i.e., at present the parent script is calling another child/dependent script for only once. What we want is, the parent script itself has to execute multiple times, and in each one it... (1 Reply)
Discussion started by: Gangegowda
1 Replies

7. Programming

Control multiple program instances - open multiple files problem

Hello. This shouldn't be an unusual problem, but I cannot find anything about it at google or at other search machine. So, I've made an application using C++ and QtCreator. I 've made a new mime type for application's project files. My system (ubuntu 10.10), when I right click a file and I... (3 Replies)
Discussion started by: hakermania
3 Replies

8. Programming

Multiple instances of pthread

Suppose I declare pthread_t clear_thread; and then pthread_create(&clear_thread, &detach, clear_message, this); the thread is supposed to go away, perform the service it is intended to procide, and then kill itself. A little while later, I require this service again, so I say ... (2 Replies)
Discussion started by: clerew
2 Replies

9. Shell Programming and Scripting

Executing multiple ssh commands inside a shell simultaneously

I would like to execute a commands in four different servers through ssh at a single instance(simultaneously). Below are the details with examples, ssh user1@server1 "grep xxxx logs" ssh user1@server2 "grep xxxx logs" ssh user1@server3 "grep xxxx logs" Each statement will take some... (4 Replies)
Discussion started by: Amutha
4 Replies

10. UNIX for Beginners Questions & Answers

Connecting to multiple instances on the same server

I have a db server with two instances...trying to create an expect script that will scan both the listener and the alert log files and retrieve their sizes. Issue we have is that the .profile is hard coded with one of the databases name and script is always pulling from the same instance (testdb1)... (1 Reply)
Discussion started by: donpasscal
1 Replies
XtAppCreateShell(3)						   XT FUNCTIONS 					       XtAppCreateShell(3)

NAME
XtAppCreateShell, XtVaAppCreateShell - create top-level widget instance SYNTAX
Widget XtAppCreateShell(String application_name, String application_class, WidgetClass widget_class, Display *display, ArgList args, Cardi- nal num_args); Widget XtVaAppCreateShell(String application_name, String application_class, WidgetClass widget_class, Display *display, ...); ARGUMENTS
application_name Specifies the name of the application instance. application_class Specifies the class name of this application. widget_class Specifies the widget class that the application top-level widget should be. display Specifies the display from which to get the resources. args Specifies the argument list from which to get the resources. num_args Specifies the number of arguments in the argument list. ... Specifies the variable argument list from which to get the resources. DESCRIPTION
The XtAppCreateShell function saves the specified application name and application class for qualifying all widget resource specifiers. The application name and application class are used as the left-most components in all widget resource names for this application. XtApp- CreateShell should be used to create a new logical application within a program or to create a shell on another display. In the first case, it allows the specification of a new root in the resource hierarchy. In the second case, it uses the resource database associated with the other display. Note that the widget returned by XtAppCreateShell has the WM_COMMAND property set for session managers (see Chapter 4). SEE ALSO
XtCreateWidget(3Xt) X Toolkit Intrinsics - C Language Interface Xlib - C Language X Interface X Version 11 libXt 1.0.7 XtAppCreateShell(3)
All times are GMT -4. The time now is 06:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy