Sponsored Content
Top Forums Shell Programming and Scripting Cannot get terminal application to launch with a graphical launcher when successful in terminal Post 302966685 by Huitzilopochtli on Monday 15th of February 2016 12:34:26 PM
Old 02-15-2016
Could you please explain to me what BASH's "select" is?? I'm not familiar with this concept.
 

10 More Discussions You Might Find Interesting

1. Solaris

Script to launch terminal window?

Hi, I am a newbie here. Trying to find a way of writing a script to launch multiple terminal or console windows on solaris 9. I used to be able to do this using cmdtool on older versions of solaris and it was even possible to configure the size and screen position of the window and the title. ... (5 Replies)
Discussion started by: omerta
5 Replies

2. Shell Programming and Scripting

Need help writing an Applescript to launch a specific Terminal Command...

I developed a script in Lingon (which is an automated script editor developed for OS X) that is used to automatically restart programs only if they crash. The script itself does just that, but I only want it to load if I'm going to use the specific application that it's designed to protect. In... (3 Replies)
Discussion started by: JFraser1
3 Replies

3. OS X (Apple)

Need help writing an Applescript to launch a specific Terminal Command...

I developed a script in Lingon (which is an automated script editor developed for OS X) that is used to automatically restart programs only if they crash. The script itself does just that, but I only want it to load if I'm going to use the specific application that it's designed to protect. In the... (2 Replies)
Discussion started by: JFraser1
2 Replies

4. Programming

Redirecting Terminal to Local Application!

i wanted to execute some terminal commands on local linux, parse their output and display it to the user, i checked netcat source code but i couldnt understance it since im new to c (and linux at the same time). so i was wondering if there is away to run an instance of terminal hidden, read and... (15 Replies)
Discussion started by: JonhyM
15 Replies

5. Shell Programming and Scripting

How do I launch a command on an existing terminal in unix using PERL

Hello, I have a PERL-TK based GUI from which I want to launch a command on an existing UNIX terminal (this is also the parent terminal for this perl based gui window). The command I want to launch is interactive (there is no intention to interact with that command from the same PERL gui i.e. no... (2 Replies)
Discussion started by: AnuragJindal
2 Replies

6. OS X (Apple)

Can't launch x11 remotely from terminal

After I installed OS X Lion I haven't been able to launch x11 remotely (using ssh) from Terminal. It works fine locally, and also remotely directly from the Xterm. I log in to the unix server at my university from the terminal like this: ssh -l -X login@host.com This used to launch... (1 Reply)
Discussion started by: gnyrf
1 Replies

7. Red Hat

Not able to see the terminal icon in the applications menu to launch the command prompt in Centos

After installing centos iam not able to see the terminal icon in the applications menu to launch the command prompt in Centos. However iam able to see the Open Terminal menu, when i right click and it is not working. let me know what are the things i need to check.:b: (1 Reply)
Discussion started by: Kesavan
1 Replies

8. UNIX for Dummies Questions & Answers

pbpaste to application in terminal

Is it possible to execute a pbpaste command to an application or current application in focus? Thanks (0 Replies)
Discussion started by: fhill2
0 Replies

9. UNIX for Dummies Questions & Answers

Routing command to another graphical terminal

So, I'm in a graphical terminal (xfce4-terminal) and I was wondering, would there be a way to type a command, and it run in a new terminal window?? An example would be like, say that I want to open a .txt file, but I want it in a different window, instead of the one that I'm currently using because... (1 Reply)
Discussion started by: Huitzilopochtli
1 Replies

10. Shell Programming and Scripting

Print Terminal Output Exactly how it Appears in the Terminal to a New Text File

Hello All, I have a text file containing output from a command that contains lots of escape/control characters that when viewed using vi or view, looks like jibberish. But when viewed using the cat command the output is formatted properly. Is there any way to take the output from the cat... (7 Replies)
Discussion started by: mrm5102
7 Replies
Net::Server::SIG(3)					User Contributed Perl Documentation				       Net::Server::SIG(3)

NAME
Net::Server::SIG - adpf - Safer signal handling SYNOPSIS
use Net::Server::SIG qw(register_sig check_sigs); use IO::Select (); use POSIX qw(WNOHANG); my $select = IO::Select->new(); register_sig(PIPE => 'IGNORE', HUP => 'DEFAULT', USR1 => sub { print "I got a SIG $_[0] "; }, USR2 => sub { print "I got a SIG $_[0] "; }, CHLD => sub { 1 while waitpid(-1, WNOHANG) > 0; }, ); # add some handles to the select $select->add(*STDIN); # loop forever trying to stay alive while(1) { # do a timeout to see if any signals got passed us # while we were processing another signal my @fh = $select->can_read(10); my $key; my $val; # this is the handler for safe (fine under unsafe also) if (check_sigs()) { # or my @sigs = check_sigs(); next unless @fh; } my $handle = $fh[@fh]; # do something with the handle } DESCRIPTION
Signals prior in Perl prior to 5.7 were unsafe. Since then signals have been implemented in a more safe algorithm. Net::Server::SIG provides backwards compatibility, while still working reliably with newer releases. Using a property of the select() function, Net::Server::SIG attempts to fix the unsafe problem. If a process is blocking on select() any signal will short circuit the select. Using this concept, Net::Server::SIG does the least work possible (changing one bit from 0 to 1). And depends upon the actual processing of the signals to take place immediately after the the select call via the "check_sigs" function. See the example shown above and also see the sigtest.pl script located in the examples directory of this distribution. FUNCTIONS
"register_sig($SIG => &code_ref)" Takes key/value pairs where the key is the signal name, and the argument is either a code ref, or the words 'DEFAULT' or 'IGNORE'. The function register_sig must be used in conjuction with check_sigs, and with a blocking select() function call -- otherwise, you will observe the registered signal mysteriously vanish. "unregister_sig($SIG)" Takes the name of a signal as an argument. Calls register_sig with a this signal name and 'DEFAULT' as arguments (same as register_sig(SIG,'DEFAULT') "check_sigs()" Checks to see if any registered signals have occured. If so, it will play the registered code ref for that signal. Return value is array containing any SIGNAL names that had occured. "sig_is_registered($SIG)" Takes a signal name and returns any registered code_ref for that signal. AUTHORS
Paul Seamons (paul@seamons.com) Rob B Brown (rob@roobik.com) - Provided a sounding board and feedback in creating Net::Server::SIG and sigtest.pl. LICENSE
This package may be distributed under the terms of either the GNU General Public License or the Perl Artistic License All rights reserved. perl v5.16.2 2012-05-29 Net::Server::SIG(3)
All times are GMT -4. The time now is 12:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy