06-28-2012
It could be possible to attach to the process with a debugger and then make it call close().
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a UNIX daemon process that's been started by a parent process, an application server.
The behavior of this daemon process is to inherit and use the app
server's file descriptors (ports/sockets).
When I shutdown the app server, the daemon continues to run, because there may be other... (1 Reply)
Discussion started by: kunalashar
1 Replies
2. UNIX for Dummies Questions & Answers
What is a file descriptor in Unix??
How to find a file descriptor of a file in Unix??
Does it have anything to do with the Inode numbers?? (3 Replies)
Discussion started by: rahulrathod
3 Replies
3. UNIX for Dummies Questions & Answers
Hi
I was working on a shell script with randomly shows a page of text from a randomly selected topic .As soon as the page is displayed it callers a timer script which keeps on running indefinitely until the timer script is killed by the user.
This is where I have the problem,if I press... (2 Replies)
Discussion started by: mervin2006
2 Replies
4. Shell Programming and Scripting
Hi all , i know i ask a lot of question but these are really hard to solve and important question. I send two scripts:
expect.sh:
#!/usr/local/bin/expect
spawn ssh root@172.30.64.163
expect "login:"
send "root\n"
expect "password:"
send "root\n^M"
interact
and
son.sh:
... (2 Replies)
Discussion started by: fozay
2 Replies
5. Solaris
Hi
want to know what file (descriptor+filename+socket) is being accessed by particular process on solaris.
Purpose : while running perf. test, needs to find where is the bottleneck.
We are providing concurrnet load for around 1 hr and needs to capture data related to file usage pattern... (1 Reply)
Discussion started by: raxitsheth
1 Replies
6. Shell Programming and Scripting
Hi. !
When I use the 'NOHUP' along with the '&', the process will be running in the background. Even when I attempt to close (Meaning 'EXIT') the session (say PUTTY in this case), it wont exit unless the process is completed.
But, say when I forcefully terminate the session (SHUT DOWN the... (2 Replies)
Discussion started by: WinBarani
2 Replies
7. Programming
can someone provide an example, where if the parent process quits for any reason, then the child process will also close? (3 Replies)
Discussion started by: omega666
3 Replies
8. AIX
Hi,
How to release file description area from specified process.
Problem is that process started - open one file ( ~2GB ) - file has been removed - process still shown that file is used by process and can't release space on filesystem.
It is not allowable to kill process !!!
Regs,... (3 Replies)
Discussion started by: KrzysiekPi
3 Replies
9. UNIX for Advanced & Expert Users
is it possible to duplicate file descriptors(opened by a different process) with the help of dup or dup2. the two process do not share parent child relationship as well. (2 Replies)
Discussion started by: replytoshishir
2 Replies
10. Shell Programming and Scripting
Hi Folks -
I am building a process to kill a list of services. Sometimes, there's a service that hangs therefore I need to add an additionla peice of code to kill all instances of a service if it exists.
Here is that portion of code:
echo... (10 Replies)
Discussion started by: SIMMS7400
10 Replies
LEARN ABOUT OPENSOLARIS
tnfctl_close
tnfctl_close(3TNF) TNF Library Functions tnfctl_close(3TNF)
NAME
tnfctl_close - close a tnfctl handle
SYNOPSIS
cc [ flag ... ] file ... -ltnfctl [ library ... ]
#include <tnf/tnfctl.h>
tnfctl_errcode_t tnfctl_close(tnfctl_handle_t *hndl,
tnfctl_targ_op_t action);
DESCRIPTION
tnfctl_close() is used to close a tnfctl handle and to free up the memory associated with the handle. When the handle is closed, the trac-
ing state and the states of the probes are not changed. tnfctl_close() can be used to close handles in any mode, that is, whether they were
created by tnfctl_internal_open(3TNF), tnfctl_pid_open(3TNF), tnfctl_exec_open(3TNF), tnfctl_indirect_open(3TNF), or tnfctl_ker-
nel_open(3TNF).
The action argument is only used in direct mode, that is, if hndl was created by tnfctl_exec_open(3TNF) or tnfctl_pid_open(3TNF). In direct
mode, action specifies whether the process will proceed, be killed, or remain suspended. action may have the following values:
TNFCTL_TARG_DEFAULT Kills the target process if hndl was created with tnfctl_exec_open(3TNF), but lets it continue if it was created
with tnfctl_pid_open(3TNF).
TNFCTL_TARG_KILL Kills the target process.
TNFCTL_TARG_RESUME Allows the target process to continue.
TNFCTL_TARG_SUSPEND Leaves the target process suspended. This is not a job control suspend. It is possible to attach to the process
again with a debugger or with the tnfctl_pid_open(3TNF) interface. The target process can also be continued with
prun(1).
RETURN VALUES
tnfctl_close() returns TNFCTL_ERR_NONE upon success.
ERRORS
The following error codes apply to tnfctl_close():
TNFCTL_ERR_BADARG A bad argument was sent in action.
TNFCTL_ERR_INTERNAL An internal error occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWtnfc |
+-----------------------------+-----------------------------+
|MT Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
prex(1), prun(1), TNF_PROBE(3TNF), libtnfctl(3TNF), tnfctl_exec_open(3TNF), tnfctl_indirect_open(3TNF), tnfctl_kernel_open(3TNF),
tnfctl_pid_open(3TNF), tracing(3TNF), attributes(5)
SunOS 5.11 4 Mar 1997 tnfctl_close(3TNF)