title: Segmentation fault backtracked to vfprintf?
body: <p>I get a segmentation fault and using gdb and backtrace, it is thrown at vprintf.</p>
  
  <pre><code>#0  0x006e8779 in vfprintf () from /lib/libc.so.6
  #1  0x006f265f in fprintf () from /lib/libc.so.6
  #2  0x08049fd1 in write_tofile (logfile=0x9843090 "~/www/log") at example.c:446
  </code></pre>
  
  <p>It happens when I call</p>
  
  <pre><code>file = fopen(log_file, "a"); // log_file = "~/www/log"
  fprintf(file, buffer);
  </code></pre>
  
  <p>Can fopen handle files from different directories? Would anyone have a clue as to why it segfaults here?</p>