Changeset 34132f7 for functions.c


Ignore:
Timestamp:
Mar 11, 2012, 10:34:18 PM (13 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
release-1.8
Children:
6a08f16
Parents:
4a80a16
git-author:
David Benjamin <davidben@mit.edu> (01/23/12 00:38:29)
git-committer:
David Benjamin <davidben@mit.edu> (03/11/12 22:34:18)
Message:
Rewrite call_filter to use g_spawn_async_with_pipes

This simplifies the error-handling code. Also fixes a bug where file
descriptors get double-closed in call_filter. Also adds a unit test. The
separate prog argument is removed to avoid having to deal with
G_SPAWN_FILE_AND_ARGV_ZERO, and since we don't really use it anyway.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    r8e755c6 r34132f7  
    411411
    412412  zcrypt = g_build_filename(owl_get_bindir(), "zcrypt", NULL);
    413   argv[0] = "zcrypt";
     413  argv[0] = zcrypt;
    414414  argv[1] = "-E";
    415415  argv[2] = "-c"; argv[3] = owl_zwrite_get_class(z);
     
    417417  argv[6] = NULL;
    418418
    419   rv = call_filter(zcrypt, argv, owl_zwrite_get_message(z), &cryptmsg, &status);
     419  rv = call_filter(argv, owl_zwrite_get_message(z), &cryptmsg, &status);
    420420
    421421  g_free(zcrypt);
Note: See TracChangeset for help on using the changeset viewer.