Commit 46b277fe authored by Leigh Stoller's avatar Leigh Stoller

/*

 * Define vfork to fork. Why? Well starting at 6.X FreeBSD switched
 * its underlying pthread impl, and popen is broken in threaded apps,
 * since it uses vfork. I have no understanding of any of this, only
 * that avoiding vfork solves the problem.  We can back this change
 * out once we figure out a real solution.
 */
parent 7ed5f5a7
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2004 University of Utah and the Flux Group.
* Copyright (c) 2004, 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
......@@ -12,6 +12,18 @@
#include "popenf.h"
/*
* Define vfork to fork. Why? Well starting at 6.X FreeBSD switched
* its underlying pthread impl, and popen is broken in threaded apps,
* since it uses vfork. I have no understanding of any of this, only
* that avoiding vfork solves the problem. We can back this change
* out once we figure out a real solution.
*/
int vfork()
{
return fork();
}
FILE *vpopenf(const char *fmt, const char *type, va_list args)
{
char cmd_buf[1024], *cmd = cmd_buf;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment