blob: 54bb5ae95a555bc302bd0014bf8edd3344f198f4 [file] [log] [blame]
Todd Wang644ec622015-04-06 17:46:44 -07001// Copyright 2015 The Vanadium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5package exec
6
7// ExecVersionVariable is the name of the environment variable used by the exec
8// package to communicate the protocol version between the parent and child. It
9// takes care to clear this variable from the child process' environment as soon
10// as it can, however, there may still be some situations where an application
11// may need to test for its presence or ensure that it doesn't appear in a set
12// of environment variables; exposing the name of this variable is intended to
13// support such situations.
14const ExecVersionVariable = "V23_EXEC_VERSION"
Todd Wang3bb46f52015-05-14 22:01:18 -070015
16const (
17 version1 = "1.0.0"
18 readyStatus = "ready::"
19 failedStatus = "failed::"
20 initStatus = "init"
21
22 // eofChar is written onto the status pipe to signal end-of-file. It
23 // should be the last byte written onto the pipe, before closing it.
24 // This signals to the reader that no more input is coming. This is
25 // needed since we cannot use the closing of the write end of the pipe
26 // to send io.EOF to the reader: since there are two write ends (one in
27 // the parent and one in the child), closing any one of the two is not
28 // going to send io.EOF to the reader.
29 // Since the data coming from the child should be valid utf-8, we pick
30 // one of the invalid utf-8 bytes for this.
31 eofChar = 0xFF
32)