time.c (9a4902a99fd0225878dc081f5bc9599c84faad0d) time.c (1fd98d7d880e470809cc3284ef04a03bf3490b02)
1/*
2 * Copyright (c) 1987, 1988, 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

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

37 The Regents of the University of California. All rights reserved.\n";
38#endif /* not lint */
39
40#ifndef lint
41#if 0
42static char sccsid[] = "@(#)time.c 8.1 (Berkeley) 6/6/93";
43#endif
44static const char rcsid[] =
1/*
2 * Copyright (c) 1987, 1988, 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

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

37 The Regents of the University of California. All rights reserved.\n";
38#endif /* not lint */
39
40#ifndef lint
41#if 0
42static char sccsid[] = "@(#)time.c 8.1 (Berkeley) 6/6/93";
43#endif
44static const char rcsid[] =
45 "$Id: time.c,v 1.10 1998/07/28 10:08:16 des Exp $";
45 "$Id: time.c,v 1.11 1998/08/24 10:16:59 cracauer Exp $";
46#endif /* not lint */
47
48#include <sys/types.h>
49#include <sys/time.h>
50#include <sys/resource.h>
51#include <sys/signal.h>
52#include <sys/sysctl.h>
53#include <stdlib.h>

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

101
102 if (ofn) {
103 if ((out = fopen(ofn, aflag ? "a" : "w")) == NULL)
104 err(1, "%s", ofn);
105 setvbuf(out, (char *)NULL, _IONBF, (size_t)0);
106 }
107
108 gettimeofday(&before, (struct timezone *)NULL);
46#endif /* not lint */
47
48#include <sys/types.h>
49#include <sys/time.h>
50#include <sys/resource.h>
51#include <sys/signal.h>
52#include <sys/sysctl.h>
53#include <stdlib.h>

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

101
102 if (ofn) {
103 if ((out = fopen(ofn, aflag ? "a" : "w")) == NULL)
104 err(1, "%s", ofn);
105 setvbuf(out, (char *)NULL, _IONBF, (size_t)0);
106 }
107
108 gettimeofday(&before, (struct timezone *)NULL);
109 switch(pid = vfork()) {
109 switch(pid = fork()) {
110 case -1: /* error */
111 err(1, "time");
112 /* NOTREACHED */
113 case 0: /* child */
114 execvp(*argv, argv);
115 warn("%s", *argv);
116 _exit(1);
117 /* NOTREACHED */

--- 95 unchanged lines hidden ---
110 case -1: /* error */
111 err(1, "time");
112 /* NOTREACHED */
113 case 0: /* child */
114 execvp(*argv, argv);
115 warn("%s", *argv);
116 _exit(1);
117 /* NOTREACHED */

--- 95 unchanged lines hidden ---