remove debug messages v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sun, 05 May 2019 11:54:53 +0200
branchv_0
changeset 4 050ec7c1f2e7
parent 3 e086ae6a19c3
child 5 86de8e6ab231
remove debug messages
src/AwkHandler.h
--- a/src/AwkHandler.h	Sun May 05 11:51:45 2019 +0200
+++ b/src/AwkHandler.h	Sun May 05 11:54:53 2019 +0200
@@ -78,11 +78,8 @@
 	void cleanUp() {
 		if (awkInputWriterFD >= 0) {
 			closeOrThrow(awkInputWriterFD);
-			fwprintf(stderr, L"writing done and closed\n");
 			__pid_t waitResult1 = wait(NULL);
-			fwprintf(stderr, L"wait 1 done: %d\n", waitResult1);
 			__pid_t waitResult2 = wait(NULL);
-			fwprintf(stderr, L"wait 2 done: %d\n", waitResult2);
 			awkInputWriterFD = -1;
 		}
 	}
@@ -116,14 +113,12 @@
 			redirectFD(awkOutputWriterFD, STDOUT_FILENO);
 
 
-			fwprintf(stderr, L"I am child AWK with PID: %d\n", getpid());
 			execlp("awk", "awk", "{print \"AWK says: line \" NR \" = \" $0;}", nullptr);
 
 		} else {
 			// Parent process
 			closeOrThrow(awkInputReaderFD);
 			closeOrThrow(awkOutputWriterFD);
-			fwprintf(stderr, L"Forked AWK has PID: %d\n", awkPid);
 
 			__pid_t writerPid = fork();
 
@@ -132,7 +127,6 @@
 			} else if (writerPid == 0) {
 				// Writer child process
 				closeOrThrow(awkInputWriterFD);
-				fwprintf(stderr, L"I am child Writer with PID: %d Writer: %p\n", getpid(), relationalWriter);
 
 				__gnu_cxx::stdio_filebuf<wchar_t> awkOutputReaderBuffer(awkOutputReaderFD, std::ios::in);
 				std::wistream awkOutputReader(&awkOutputReaderBuffer);
@@ -150,7 +144,6 @@
 			} else {
 				// Parent process
 				closeOrThrow(awkOutputReaderFD);
-				fwprintf(stderr, L"Forked Writer has PID: %d\n", writerPid);
 			}
 		}