Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On System Programming with Go

You're reading from   Hands-On System Programming with Go Build modern and concurrent applications for Unix and Linux systems using Golang

Arrow left icon
Product type Paperback
Published in Jul 2019
Publisher Packt
ISBN-13 9781789804072
Length 458 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Alex Guerrieri Alex Guerrieri
Author Profile Icon Alex Guerrieri
Alex Guerrieri
Arrow right icon
View More author details
Toc

Table of Contents (24) Chapters Close

Preface 1. Section 1: An Introduction to System Programming and Go FREE CHAPTER
2. An Introduction to System Programming 3. Unix OS Components 4. An Overview of Go 5. Section 2: Advanced File I/O Operations
6. Working with the Filesystem 7. Handling Streams 8. Building Pseudo-Terminals 9. Section 3: Understanding Process Communication
10. Handling Processes and Daemons 11. Exit Codes, Signals, and Pipes 12. Network Programming 13. Data Encoding Using Go 14. Section 4: Deep Dive into Concurrency
15. Dealing with Channels and Goroutines 16. Synchronization with sync and atomic 17. Coordination Using Context 18. Implementing Concurrency Patterns 19. Section 5: A Guide to Using Reflection and CGO
20. Using Reflection 21. Using CGO 22. Assessments 23. Other Books You May Enjoy

Summary

In this chapter, we reviewed how to get information related to the current process, PID and PPID, UID and GID,  and the working directory. Then, we saw how the os/exec package allows us to create child processes, and how their properties can be read similar to the current process.

Next, we looked at what daemons are and how various operating systems support them. We verified how simple it is to execute a process that outlives its parent with os/exec using Cmd.Run.

Then, we went through the automated daemon management systems that are available with Unix, and created an application capable of running with service step by step.

In the next chapter, we are going to improve the control we have over child processes by checking out how to use exit codes and how to manage and send signals.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime