~daniel-sonck/upstart/cron-replacement

« back to all changes in this revision

Viewing changes to extra/man/socket-event.7

  • Committer: dsonck
  • Date: 2011-10-14 14:32:00 UTC
  • mfrom: (1282.1.47 upstart)
  • Revision ID: dsonck@daniel-desktop-20111014143200-ezekcd0k43ykog2l
Merged with the latest startup branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.TH socket\-event 8 2011-03-08 upstart
 
2
.\"
 
3
.SH NAME
 
4
socket \- event signalling that a socket connection has been made
 
5
.\"
 
6
.SH SYNOPSIS
 
7
.B socket
 
8
.BI PROTO\fR= PROTO
 
9
.BI PORT\fR= PORT
 
10
.BI ADDR\fR= ADDR
 
11
 
 
12
.B socket
 
13
.BI PROTO\fR= PROTO
 
14
.BI PATH\fR= PATH
 
15
.\"
 
16
.SH DESCRIPTION
 
17
 
 
18
The
 
19
.B socket
 
20
event is generated by the
 
21
.BR upstart\-socket\-bridge (8)
 
22
daemon when a socket connection is made whose details match the
 
23
socket event condition and environment specified in a jobs
 
24
.B start on
 
25
or
 
26
.B stop on
 
27
stanza.
 
28
 
 
29
When an incoming connection is detected, the file descriptor
 
30
representing the socket is passed to the job in question to allow it to
 
31
.BR accept (2)
 
32
the connection. Additionally, the environment variable
 
33
.B UPSTART_JOB
 
34
will contain the name of the event ("socket") and the environment
 
35
variable
 
36
.B UPSTART_FDS
 
37
will contain the number of the file descriptor corresponding to the
 
38
listening socket.
 
39
.\"
 
40
.SH EXAMPLES
 
41
.\"
 
42
.SS Internet socket
 
43
Start web server when first client connects from localhost:
 
44
.RS
 
45
.nf
 
46
 
 
47
start on socket PROTO=inet PORT=80 ADDR=127.0.0.1
 
48
.fi
 
49
.RE
 
50
.\"
 
51
.SS Local socket
 
52
.P
 
53
.RS
 
54
.nf
 
55
 
 
56
start on socket PROTO=unix PATH=/var/run/.s.pgsql.1234
 
57
.fi
 
58
.FE
 
59
.\"
 
60
.SS Abstract socket
 
61
.P
 
62
 
 
63
.RS
 
64
.nf
 
65
 
 
66
start on socket PROTO=unix PATH=@/at/upstart/example
 
67
.fi
 
68
.FE
 
69
.\"
 
70
.SH AUTHOR
 
71
Written by Scott James Remnant
 
72
.RB < scott@netsplit.com >
 
73
 
 
74
Manual page written by James Hunt
 
75
.RB < james.hunt@ubuntu.com >
 
76
.\"
 
77
.SH BUGS
 
78
Report bugs at 
 
79
.RB < https://launchpad.net/upstart/+bugs >
 
80
.\"
 
81
.SH COPYRIGHT
 
82
Copyright \(co 2011 Canonical Ltd.
 
83
.PP
 
84
This is free software; see the source for copying conditions.  There is NO
 
85
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
86
.\"
 
87
.SH SEE ALSO
 
88
.BR init (5)
 
89
.BR init (8)
 
90
.BR socket (2)
 
91
.BR socket (7)
 
92
.BR upstart\-socket\-bridge (8)