Changeset ced25d1 for zwrite.c


Ignore:
Timestamp:
Feb 21, 2003, 10:31:16 AM (21 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
2c8d62e
Parents:
060b3b4
Message:
In the zlist function, give a more detailed error message if
  the file cannot be opened.
Renamed old instances of zsig_exec in the code to zsigproc
Don't print the stderr from zsigproc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zwrite.c

    re3869df rced25d1  
    2222  int argc, badargs, myargc;
    2323  char **argv, **myargv;
    24   char *zsigexec, *zsigowlvar, *zsigzvar, *ptr;
     24  char *zsigproc, *zsigowlvar, *zsigzvar, *ptr;
    2525  struct passwd *pw;
    2626
     
    112112
    113113  /* set a zsig */
    114   zsigexec = owl_global_get_zsig_exec(&g);
     114  zsigproc = owl_global_get_zsigproc(&g);
    115115  zsigowlvar = owl_global_get_zsig(&g);
    116116  zsigzvar = ZGetVariable("zwrite-signature");
     
    119119    owl_free(z->zsig);
    120120    z->zsig=strdup(zsigowlvar);
    121   } else if (zsigexec && *zsigexec) {
     121  } else if (zsigproc && *zsigproc) {
    122122    FILE *file;
    123     char buff[LINE];
    124 
    125     file=popen(zsigexec, "r");
     123    char buff[LINE], *openline;
     124
     125    /* simple hack for now to nuke stderr */
     126    openline=owl_malloc(strlen(zsigproc)+40);
     127    strcpy(openline, zsigproc);
     128    strcat(openline, " 2> /dev/null");
     129    file=popen(openline, "r");
     130    owl_free(openline);
    126131    if (!file) {
    127132      if (zsigzvar && *zsigzvar) {
Note: See TracChangeset for help on using the changeset viewer.