Assume that you've cloned mtail into /space/gitrepos/github/mtail Start up the container:
docker run --rm -it -v /space/gitrepos/github/mtail:/go/src/github.com/google/mtail golang bash
Then compile inside the container:
# Copied from https://www.citusdata.com/blog/2019/07/17/postgres-tips-for-average-and-power-user/ | |
\timing on | |
\pset linestyle unicode | |
\pset border 2 | |
\setenv PAGER 'pspg --no-mouse -bX --no-commandbar --no-topbar' | |
\set HISTSIZE 100000 |
package klshxsh; | |
/* | |
<dependency> | |
<groupId>com.h2database</groupId> | |
<artifactId>h2</artifactId> | |
<version>1.4.196</version> | |
<scope>test</scope> | |
</dependency> | |
*/ |
/* | |
<dependency> | |
<groupId>commons-io</groupId> | |
<artifactId>commons-io</artifactId> | |
<version>2.6</version> | |
</dependency> | |
*/ | |
private Element parseXML(String xml) throws ParserConfigurationException, SAXException, IOException { | |
DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance(); |
Assume that you've cloned mtail into /space/gitrepos/github/mtail Start up the container:
docker run --rm -it -v /space/gitrepos/github/mtail:/go/src/github.com/google/mtail golang bash
Then compile inside the container:
import java.net.ConnectException; | |
import java.net.HttpURLConnection; | |
import java.net.URL; | |
import java.io.InputStream; | |
import java.io.IOException; | |
import java.security.cert.CertPathValidatorException; | |
import java.security.cert.CertPath; | |
import java.security.cert.Certificate; | |
import javax.net.ssl.HttpsURLConnection; |
Install the debootstrap package:
$ sudo apt-get install debootstrap
Create the chroot - takes a while since it downloads a minimal installation (in this case, vivid - ubuntu 15.04):
$ sudo apt-get install schroot rinse
The preconfigured setups are in /etc/rinse/rinse.conf:
$ grep "\[" /etc/rinse/rinse.conf
[rhel-5]
[centos-4]
Compile as follows:
$ make
gcc -g -o mythreads -pthread threads.c
See below for the source files and an example session in gdb.
Use ps -eLf | grep mythreads
to see the threads.