 				logger.writeLog(level: Logger.LogLevels.ERROR, message: "Pid file created")
 				let pidStr = "\(pid)"
 				
+			#if os (Linux)
+				pidFileDescriptor?.writeData(pidStr.data(using: NSUTF8StringEncoding)!)
+			#else
 				pidFileDescriptor?.write(pidStr.data(using: String.Encoding.utf8)!)
+			#endif
 				pidFileDescriptor?.closeFile()
 				childProcessPid = pid
 			}

		
	#if swift(>=3)
		
		if(FileManager.default().fileExists(atPath: pidFile)) {
			
			let pidFileDescriptor = FileHandle(forReadingAtPath: pidFile)
			if(pidFileDescriptor == nil) {
				
				return -1
			}else{
				pidFileDescriptor?.seek(toFileOffset: 0)
				
				if let pidData = pidFileDescriptor?.readDataToEndOfFile() {
					
					let pidStr = String(data: pidData, encoding: String.Encoding.utf8)
					pidFileDescriptor?.closeFile()
					
					if let pidVal = Int32(pidStr!) {

			
			
		} while (running && runLoop.run(mode: RunLoopMode.defaultRunLoopMode, before: Date().addingTimeInterval(-1 * Constants.CpuSleepMsec)))
	#endif
		
		logger.writeLog(level: Logger.LogLevels.WARNINGS, message: "Child process will be stop \(running)")
	#else
