Deleted Added
full compact
names.c (77274) names.c (88150)
1/*
2 * Copyright (c) 1980, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 22 unchanged lines hidden (view full) ---

31 * SUCH DAMAGE.
32 */
33
34#ifndef lint
35#if 0
36static char sccsid[] = "@(#)names.c 8.1 (Berkeley) 6/6/93";
37#endif
38static const char rcsid[] =
1/*
2 * Copyright (c) 1980, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 22 unchanged lines hidden (view full) ---

31 * SUCH DAMAGE.
32 */
33
34#ifndef lint
35#if 0
36static char sccsid[] = "@(#)names.c 8.1 (Berkeley) 6/6/93";
37#endif
38static const char rcsid[] =
39 "$FreeBSD: head/usr.bin/mail/names.c 77274 2001-05-27 20:26:22Z mikeh $";
39 "$FreeBSD: head/usr.bin/mail/names.c 88150 2001-12-18 20:52:09Z mikeh $";
40#endif /* not lint */
41
42/*
43 * Mail -- a mail program
44 *
45 * Handle name lists.
46 */
47

--- 243 unchanged lines hidden (view full) ---

291 * Now either copy "image" to the desired file
292 * or give it as the standard input to the desired
293 * program as appropriate.
294 */
295
296 if (ispipe) {
297 int pid;
298 char *sh;
40#endif /* not lint */
41
42/*
43 * Mail -- a mail program
44 *
45 * Handle name lists.
46 */
47

--- 243 unchanged lines hidden (view full) ---

291 * Now either copy "image" to the desired file
292 * or give it as the standard input to the desired
293 * program as appropriate.
294 */
295
296 if (ispipe) {
297 int pid;
298 char *sh;
299 sigset_t nset;
299
300 /*
301 * XXX
302 * We can't really reuse the same image file,
303 * because multiple piped recipients will
304 * share the same lseek location and trample
305 * on one another.
306 */
307 if ((sh = value("SHELL")) == NULL)
308 sh = _PATH_CSHELL;
300
301 /*
302 * XXX
303 * We can't really reuse the same image file,
304 * because multiple piped recipients will
305 * share the same lseek location and trample
306 * on one another.
307 */
308 if ((sh = value("SHELL")) == NULL)
309 sh = _PATH_CSHELL;
309 pid = start_command(sh,
310 sigmask(SIGHUP)|sigmask(SIGINT)|sigmask(SIGQUIT),
311 image, -1, "-c", fname, NULL);
310 (void)sigemptyset(&nset);
311 (void)sigaddset(&nset, SIGHUP);
312 (void)sigaddset(&nset, SIGINT);
313 (void)sigaddset(&nset, SIGQUIT);
314 pid = start_command(sh, &nset, image, -1, "-c", fname,
315 NULL);
312 if (pid < 0) {
313 senderr++;
314 goto cant;
315 }
316 free_child(pid);
317 } else {
318 int f;
319 if ((fout = Fopen(fname, "a")) == NULL) {

--- 395 unchanged lines hidden ---
316 if (pid < 0) {
317 senderr++;
318 goto cant;
319 }
320 free_child(pid);
321 } else {
322 int f;
323 if ((fout = Fopen(fname, "a")) == NULL) {

--- 395 unchanged lines hidden ---