diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-12-14 08:38:27 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-12-16 19:52:08 +0000 |
commit | 7123f0cab155c5c25ecae670677683001c1634ad (patch) | |
tree | 7163ed2d28473d9c659db356c90f16d56858ccd7 /fish/reopen.c | |
parent | 3c9dfd1e95fae5c31df1fbcb6bdec2982a69a004 (diff) | |
download | libguestfs-7123f0cab155c5c25ecae670677683001c1634ad.tar.gz libguestfs-7123f0cab155c5c25ecae670677683001c1634ad.tar.xz libguestfs-7123f0cab155c5c25ecae670677683001c1634ad.zip |
fish: Allow events to be processed in guestfish.
Add 'event', 'list-events' and 'delete-event' commands so that event
handlers can be registered, listed and deleted in guestfish. The
event handler is a shell script snippet or host command.
Cc: Pádraig Brady <P@draigBrady.com>
Diffstat (limited to 'fish/reopen.c')
-rw-r--r-- | fish/reopen.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fish/reopen.c b/fish/reopen.c index 56c189ea..585bbd23 100644 --- a/fish/reopen.c +++ b/fish/reopen.c @@ -83,5 +83,12 @@ run_reopen (const char *cmd, size_t argc, char *argv[]) guestfs_close (g); g = g2; + /* We don't bother copying event handlers over to the new handle, + * but we have to reset the list because they were registered + * against the old handle. + */ + free_event_handlers (); + init_event_handlers (); + return 0; } |