Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Getting a process/program version from /proc folder Post 302659163 by Corona688 on Wednesday 20th of June 2012 12:07:56 PM
Old 06-20-2012
It would be nice, but it's certainly not something you can extract from /proc/. Processes and executables don't really have that kind of embedded information. You'll have to deal with the programs and OSes the hard way.

There's systems that don't even have /proc by the way, like OSX and HPUX.
 

8 More Discussions You Might Find Interesting

1. Linux

How to call a proc file from *.c program?

Hi, I am new to Linux programming. As part of learning, I need to create a *.c program where we call certain /proc files (i.e. such as meminfo, version, uptime, etc...) from our program. Can anyone point me to a simple program on how one would do this (i.e. can you directly call uptime() or... (4 Replies)
Discussion started by: pat_and_cami
4 Replies

2. Shell Programming and Scripting

Error in script to automate the daily monitoring process of UNIX server and it's proc

hi friends, I am trying to automate the daily monitoring process of UNIX server and it's processes. the script are below i executed the above script using ksh -x monitortest1.sh in root login . It shows error at some lines . 1. i logged in using root ,but it... (8 Replies)
Discussion started by: rdhaprakasam
8 Replies

3. AIX

AIX equivalent to /proc/self/cmdline to get process name from C++ program

Hi, I'm porting some old C++ code (that I didn't write) from Linux to AIX and have run into a problem in getting the process name from within the code when it is run on AIX. Basically the code is getting the process name so it can then return it to the rest of the code as argv. This code is trying... (1 Reply)
Discussion started by: tbk
1 Replies

4. UNIX for Dummies Questions & Answers

proc program compilation in unix

hi, i need to compile a proc program, say prog.pc can we compile this program in the unix environment? does this need a make file? can anyone help me on this since i am new to this area. Thanks in advance. (1 Reply)
Discussion started by: csprog
1 Replies

5. Red Hat

Output of /proc/version

Hi, I am a newbie in Linux. Appended is the output of cat /proc/version and uname -a. # cat /proc/version Linux version 2.6.32.12-115.fc12.i686 (mockbuild@x86-03.phx2.fedoraproject.org) (gcc version 4.4.3 20100127 (Red Hat 4.4.3-4) (GCC) ) #1 SMP Fri Apr 30 20:34:53 UTC 2010 # uname -a... (7 Replies)
Discussion started by: Hari_Ganesh
7 Replies

6. Shell Programming and Scripting

does the pid of background process show in /proc?

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)
Discussion started by: homeboy
6 Replies

7. Solaris

Logging the memory consumed by a process with c/C++ without using proc

I need to log the size of physical/virtual memory consumed by any given given process using c/c++ code running on solaris and aix without using the proc filesystem. Please advise. (1 Reply)
Discussion started by: Manisha Paul
1 Replies

8. Programming

How to compile and run the ProC (*.pc) program?

Hi Team, I am very new to this forum and hope someone will help me in resolving the issue. I am new to Pro C also. I made some changes to the existing Pro C program and want to run the program with the changes. But I am unable to neither compile nor run the program. Please do the... (2 Replies)
Discussion started by: prakashs1218
2 Replies
Tk_CreateClientMessageHandler(3tk)			       Tk Library Procedures				Tk_CreateClientMessageHandler(3tk)

__________________________________________________________________________________________________________________________________________________

NAME
Tk_CreateClientMessageHandler, Tk_DeleteClientMessageHandler - associate procedure callback with ClientMessage type X events SYNOPSIS
#include <tk.h> Tk_CreateClientMessageHandler(proc) Tk_DeleteClientMessageHandler(proc) ARGUMENTS
Tk_ClientMessageProc *proc (in) Procedure to invoke whenever a ClientMessage X event occurs on any display. _________________________________________________________________ DESCRIPTION
Tk_CreateClientMessageHandler arranges for proc to be invoked in the future whenever a ClientMessage X event occurs that is not handled by WM_PROTOCOL. Tk_CreateClientMessageHandler is intended for use by applications which need to watch X ClientMessage events, such as drag and drop applications. The callback to proc will be made by Tk_HandleEvent; this mechanism only works in programs that dispatch events through Tk_HandleEvent (or through other Tk procedures that call Tk_HandleEvent, such as Tk_DoOneEvent or Tk_MainLoop). Proc should have arguments and result that match the type Tk_ClientMessageProc: typedef int Tk_ClientMessageProc( Tk_Window tkwin, XEvent *eventPtr); The tkwin parameter to proc is the Tk window which is associated with this event. EventPtr is a pointer to the X event. Whenever an X ClientMessage event is processed by Tk_HandleEvent, the proc is called if it was not handled as a WM_PROTOCOL. The return value from proc is normally 0. A non-zero return value indicates that the event is not to be handled further; that is, proc has done all processing that is to be allowed for the event. If there are multiple ClientMessage event handlers, each one is called for each event, in the order in which they were established. Tk_DeleteClientMessageHandler may be called to delete a previously-created ClientMessage event handler: it deletes each handler it finds that matches the proc argument. If no such handler exists, then Tk_DeleteClientMessageHandler returns without doing anything. Although Tk supports it, it's probably a bad idea to have more than one callback with the same proc argument. KEYWORDS
bind, callback, event, handler Tk 8.4 Tk_CreateClientMessageHandler(3tk)
All times are GMT -4. The time now is 02:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy