1. In addition to stdin being closed (so gets(buf) would fail and continue execution without blocking), stdout/stderr are line buffered when writing to a terminal stream, so they are implicitly flushed when there is a newline[1]. There is no newline, so it is possible for the text not to be printed.
2. strcpy/memcpy is not safe when the memory regions overlap since it might do optimizations that corrupt the string[2]. memmove is the right function to use.
3. Running the process with a non-writable working directory would raise an exception when trying to open the file for appending or create the file. Additionally, the example mentions web developers, so it probably means multiple threads/processes executing concurrently. There is no synchronization in place, so output might be corrupted (small writes might behave atomically, but larger ones will most likely be written in chunks, which introduces races).
[1]: http://stackoverflow.com/a/4201325/688337
[2]: http://linux.die.net/man/3/strcpy
edit: formatting.
With the code as-is, you can introduce errors elsewhere in the program by renaming the log file, creating a directory with the same name, waiting a while for the process to run out of file descriptors, and then deleting the directory and undoing the rename. Conversely, the function can throw if another part of the program keeps too many files open.
My best guesses would be
1: Not always in a routine where user input can be obtained
2: Not sure, probably not architecture differences as that seems implied by the question
3: debug.log won't always be in the current directory