Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Crash Utility (http://www.linux-archive.org/crash-utility/)
-   -   RFE: feedback loops (http://www.linux-archive.org/crash-utility/632470-rfe-feedback-loops.html)

Bruce Korb 02-13-2012 06:13 PM

RFE: feedback loops
 
A relatively easy implementation would be to fiddle shell commands:

if (LASTCHAR(p) == '|')
error(FATAL_RESTART, "pipe to nowhere?
");

to interpret pipes to nowhere to, instead, be redirecting to a mkstemp file
that gets read back in via an internal:
sprintf(pc->command_line, "< %s", tmp_file);
after the command completes, and
unlink(tmp_file);
after *those* commands complete.

What you already have works. It's that this would be slick :).
It would make shell scripting into a crash extension language.

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility

Dave Anderson 02-13-2012 07:10 PM

RFE: feedback loops
 
----- Original Message -----
> A relatively easy implementation would be to fiddle shell commands:
>
> if (LASTCHAR(p) == '|')
> error(FATAL_RESTART, "pipe to nowhere?
");
>
> to interpret pipes to nowhere to, instead, be redirecting to a mkstemp file
> that gets read back in via an internal:
> sprintf(pc->command_line, "< %s", tmp_file);
> after the command completes, and
> unlink(tmp_file);
> after *those* commands complete.
>
> What you already have works. It's that this would be slick :).
> It would make shell scripting into a crash extension language.

Submit a patch and we'll take a look...

Dave


--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility


All times are GMT. The time now is 07:51 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.