Changeset 5c504ea485ce116afcce91a9bb8027803f5f9c02
- Timestamp:
- 04/09/07 02:34:46
(6 years ago)
- Author:
- Theo Schlossnagle <jesus@omniti.com>
- git-committer:
- Theo Schlossnagle <jesus@omniti.com> 1176086086 +0000
- git-parent:
[eb13d729653537edd09653c474ba43993b785073]
- git-author:
- Theo Schlossnagle <jesus@omniti.com> 1176086086 +0000
- Message:
a hack to make this work in multiple concurrent zones
git-svn-id: https://labs.omniti.com/resmon/trunk@39 8c0face9-b7db-6ec6-c4b3-d5f7145c7d55
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r9c26e33 |
r5c504ea |
|
| 163 | 163 | listen($handle,SOMAXCONN); |
|---|
| 164 | 164 | |
|---|
| | 165 | $self->{zindex} = 0; |
|---|
| | 166 | if (-x "/usr/sbin/zoneadm") { |
|---|
| | 167 | open(Z, "/usr/sbin/zoneadm list -p |"); |
|---|
| | 168 | my $firstline = <Z>; |
|---|
| | 169 | close(Z); |
|---|
| | 170 | ($self->{zindex}) = split /:/, $firstline, 2; |
|---|
| | 171 | } |
|---|
| 165 | 172 | $self->{http_port} = $port; |
|---|
| 166 | 173 | $self->{http_ip} = $ip; |
|---|
| | 174 | $self->{ftok_number} = $port * (1 + $self->{zindex}); |
|---|
| 167 | 175 | |
|---|
| 168 | 176 | $self->{child} = fork(); |
|---|
| … | … | |
| 230 | 238 | |
|---|
| 231 | 239 | unless($self->{shared_state}) { |
|---|
| 232 | | my $id = ftok(__FILE__,$self->{http_port}); |
|---|
| | 240 | my $id = ftok(__FILE__,$self->{ftok_number}); |
|---|
| 233 | 241 | $self->{shared_state} = shmget($id, $SEGSIZE, |
|---|
| 234 | 242 | IPC_CREAT|S_IRWXU|S_IRWXG|S_IRWXO) |
|---|