"함수 getmypid()"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-source +syntaxhighlight))
 
(다른 사용자 한 명의 중간 판 2개는 보이지 않습니다)
4번째 줄: 4번째 줄:


==Bash==
==Bash==
[[분류: Bash]]
{{참고|Bash $$}}
{{참고|Bash $$}}
<source lang='bash'>
<syntaxhighlight lang='bash'>
echo $$
echo $$
# 4917
# 4917
</source>
</syntaxhighlight>
 
==Node.js==
[[분류: Node.js]]
{{참고|Node.js process.pid}}
<syntaxhighlight lang='javascript'>
console.log( process.pid );
// 5023
</syntaxhighlight>


==PHP==
==PHP==
{{참고|PHP getmypid()}}
{{참고|PHP getmypid()}}
[[분류: PHP]]
[[분류: PHP]]
<source lang='php'>
<syntaxhighlight lang='php'>
echo getmypid();
echo getmypid();
// 4886
// 4886
</source>
</syntaxhighlight>


==Python==
==Python==
{{참고|Python os.getpid() }}
{{참고|Python os.getpid() }}
[[분류: Python]]
[[분류: Python]]
<source lang='Python'>
<syntaxhighlight lang='Python'>
import os
import os
print( os.getpid() )
print( os.getpid() )
# 4934
# 4934
</source>
</syntaxhighlight>


==Ruby==
==Ruby==
{{참고|Ruby Process.pid}}
{{참고|Ruby Process.pid}}
[[분류: Ruby]]
[[분류: Ruby]]
<source lang='Ruby'>
<syntaxhighlight lang='Ruby'>
puts Process.pid
puts Process.pid
# 5003
# 5003
</source>
</syntaxhighlight>


==같이 보기==
==같이 보기==
* [[프로세스 ID]]
* [[프로세스 ID]]

2020년 11월 2일 (월) 02:32 기준 최신판

getpid()
getmypid()

1 Bash[ | ]

echo $$
# 4917

2 Node.js[ | ]

console.log( process.pid );
// 5023

3 PHP[ | ]

echo getmypid();
// 4886

4 Python[ | ]

import os
print( os.getpid() )
# 4934

5 Ruby[ | ]

puts Process.pid
# 5003

6 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}