title: Problems with system() calls in Linux
body: <p>I'm working on a <code>init</code> for an initramfs in C++ for Linux.  This script is used to unlock the DM-Crypt w/ LUKS encrypted drive, and set the LVM drives to be available.</p>
  
  <p>Since I don't want to have to reimplement the functionality of <code>cryptsetup</code> and <code>gpg</code> I am using system calls to call the executables.  Using a system call to call gpg works fine if I have the system fully brought up already (I already have a bash script based initramfs that works fine in bringing it up, and I use grub to edit the command line to bring it up using the old initramfs).  However, in the initramfs it never even acts like it gets called.  Even commands like <code>system("echo BLAH");</code>  fail.</p>
  
  <p>So, does anyone have any input?</p>
  
  <hr>
  
  <p>Edit: So I figured out what was causing my errors.  I have no clue as to <strong>why</strong> it would cause errors, but I found it.</p>
  
  <p>In order to allow hotplugging, I needed to write <code>/sbin/mdev</code> to <code>/proc/sys/kernel/hotplug</code>...however I ended up switching around the parameters (on a function I wrote myself no less) so I was writing <code>/proc/sys/kernel/hotplug</code> to <code>/sbin/mdev</code>.</p>
  
  <p>I have no clue as to why that would cause the problem, however it did.</p>