DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 5th December 2011
steamrent steamrent is offline
New User
 
Join Date: Dec 2011
Posts: 5
Default How do I run a shell command in a while loop?

Hi,

I am running an IRC client in OpenBSD and I choose sic because with such short amount of lines it seems very audit-able for security as opposed to larger clients such as irssi.

I usually perform:

Code:
sic -h irc.freenode.net 2>&1 | tee -a irc.log
I pipe the output of sic to tee in order to log my IRC sessions.

I'm trying to handle reconnects by running it in a while loop in the shell process and cat the initial commands into sic's stdin.

I would think to approach this by using a fifo (using the mkfifo(1) command) to redirect sic's stdin, but I'm not sure if there's a more elegant way to reconnect on ping timeouts, kills, servers going down, and just disconnects in general.

How do you suggest I go about doing this?
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Running a command as a different user w/o starting the login shell Carpetsmoker General software and network 4 1st July 2011 10:33 PM
DHCP client allows shell command injection J65nko News 0 7th April 2011 01:09 AM
Full disk encryption with Loop-AES deviant085 OpenBSD Security 9 23rd November 2009 12:51 AM
Reboot loop on 7.0 upgraded to 7.1 EricM FreeBSD Installation and Upgrading 3 25th March 2009 04:25 AM
ibm eserver x225 - 7.0 installation when btx halted / endless loop underlig FreeBSD Installation and Upgrading 3 3rd August 2008 02:19 PM


All times are GMT. The time now is 08:32 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick